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

Commit 6509662a authored by Andrei Popescu's avatar Andrei Popescu Committed by Android (Google) Code Review
Browse files

Merge "Make sure access to WebView::mWebViewCore is synchronized."

parents 1898a9db 0409857f
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -1125,9 +1125,11 @@ public class WebView extends AbsoluteLayout
            mCallbackProxy.setWebViewClient(null);
            mCallbackProxy.setWebViewClient(null);
            mCallbackProxy.setWebChromeClient(null);
            mCallbackProxy.setWebChromeClient(null);
            // Tell WebViewCore to destroy itself
            // Tell WebViewCore to destroy itself
            synchronized (this) {
                WebViewCore webViewCore = mWebViewCore;
                WebViewCore webViewCore = mWebViewCore;
                mWebViewCore = null; // prevent using partial webViewCore
                mWebViewCore = null; // prevent using partial webViewCore
                webViewCore.destroy();
                webViewCore.destroy();
            }
            // Remove any pending messages that might not be serviced yet.
            // Remove any pending messages that might not be serviced yet.
            mPrivateHandler.removeCallbacksAndMessages(null);
            mPrivateHandler.removeCallbacksAndMessages(null);
            mCallbackProxy.removeCallbacksAndMessages(null);
            mCallbackProxy.removeCallbacksAndMessages(null);
@@ -5842,7 +5844,7 @@ public class WebView extends AbsoluteLayout
                cursorData(), 1000);
                cursorData(), 1000);
    }
    }


    /* package */ WebViewCore getWebViewCore() {
    /* package */ synchronized WebViewCore getWebViewCore() {
        return mWebViewCore;
        return mWebViewCore;
    }
    }