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

Commit cc2264fe authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 5309557 - Monkeys and SIGSEGV do not mix!

Make sure that the native component of WebView has been initialized
before any native-level optimization involving window focus occurs.

Change-Id: I24ca5fe21657aeb1a1faf5bc36fba5ea11064f86
parent 7a685e89
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5573,7 +5573,7 @@ public class WebView extends AbsoluteLayout
        setActive(hasWindowFocus);
        if (hasWindowFocus) {
            JWebCoreJavaBridge.setActiveWebView(this);
            if (mPictureUpdatePausedForFocusChange) {
            if (mPictureUpdatePausedForFocusChange && mNativeClass != 0) {
                WebViewCore.resumeUpdatePicture(mWebViewCore);
                nativeSetIsScrolling(false);
                mPictureUpdatePausedForFocusChange = false;
@@ -5581,7 +5581,7 @@ public class WebView extends AbsoluteLayout
        } else {
            JWebCoreJavaBridge.removeActiveWebView(this);
            final WebSettings settings = getSettings();
            if (settings != null && settings.enableSmoothTransition() &&
            if (settings != null && settings.enableSmoothTransition() && mNativeClass != 0 &&
                    mWebViewCore != null && !WebViewCore.isUpdatePicturePaused(mWebViewCore)) {
                WebViewCore.pauseUpdatePicture(mWebViewCore);
                nativeSetIsScrolling(true);