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

Commit 0e9dd3b0 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 7827

* changes:
  Fix 1986313. WebKit assumes things happened in a certain order. In this case, we can't call LoadListener's nativeError until BrowserFrame's startLoadingResource returns. Otherwise, the failed request will not be removed from the DocLoader's request list. So the page will never finish loading.
parents 53bdb5cc fadbbd2a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -550,12 +550,14 @@ class BrowserFrame extends Handler {
        mCallbackProxy.onLoadResource(url);

        if (LoadListener.getNativeLoaderCount() > MAX_OUTSTANDING_REQUESTS) {
            // send an error message, so that loadListener can be deleted
            // after this is returned. This is important as LoadListener's 
            // nativeError will remove the request from its DocLoader's request
            // list. But the set up is not done until this method is returned.
            loadListener.error(
                    android.net.http.EventHandler.ERROR, mContext.getString(
                            com.android.internal.R.string.httpErrorTooManyRequests));
            loadListener.notifyError();
            loadListener.tearDown();
            return null;
            return loadListener;
        }

        // during synchronous load, the WebViewCore thread is blocked, so we