Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9eca703d authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I499a9541 into eclair-mr2

* changes:
  setupRedirect() can throw. Catch it and signal the error.
parents 86806ce1 499a9541
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -1211,8 +1211,17 @@ class LoadListener extends Handler implements EventHandler {
                // mRequestHandle can be null when the request was satisfied
                // by the cache, and the cache returned a redirect
                if (mRequestHandle != null) {
                    try {
                        mRequestHandle.setupRedirect(mUrl, mStatusCode,
                                mRequestHeaders);
                    } catch(RuntimeException e) {
                        Log.e(LOGTAG, e.getMessage());
                        // Signal a bad url error if we could not load the
                        // redirection.
                        handleError(EventHandler.ERROR_BAD_URL,
                                mContext.getString(R.string.httpErrorBadUrl));
                        return;
                    }
                } else {
                    // If the original request came from the cache, there is no
                    // RequestHandle, we have to create a new one through