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

Commit 86aeac98 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Git Automerger
Browse files

am 1d22e122: Merge "Fix a monkey crash when the new WebView is destroyed."

Merge commit '1d22e122' into gingerbread-plus-aosp

* commit '1d22e122':
  Fix a monkey crash when the new WebView is destroyed.
parents 8a5ab396 1d22e122
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -785,11 +785,7 @@ class BrowserFrame extends Handler {
     * @return The BrowserFrame object stored in the new WebView.
     */
    private BrowserFrame createWindow(boolean dialog, boolean userGesture) {
        WebView w = mCallbackProxy.createWindow(dialog, userGesture);
        if (w != null) {
            return w.getWebViewCore().getBrowserFrame();
        }
        return null;
        return mCallbackProxy.createWindow(dialog, userGesture);
    }

    /**
+9 −3
Original line number Diff line number Diff line
@@ -1098,7 +1098,7 @@ class CallbackProxy extends Handler {
        }
    }

    public WebView createWindow(boolean dialog, boolean userGesture) {
    public BrowserFrame createWindow(boolean dialog, boolean userGesture) {
        // Do an unsynchronized quick check to avoid posting if no callback has
        // been set.
        if (mWebChromeClient == null) {
@@ -1122,9 +1122,15 @@ class CallbackProxy extends Handler {

        WebView w = transport.getWebView();
        if (w != null) {
            w.getWebViewCore().initializeSubwindow();
            WebViewCore core = w.getWebViewCore();
            // If WebView.destroy() has been called, core may be null.  Skip
            // initialization in that case and return null.
            if (core != null) {
                core.initializeSubwindow();
                return core.getBrowserFrame();
            }
        return w;
        }
        return null;
    }

    public void onRequestFocus() {