Loading core/java/android/webkit/WebViewClassic.java +5 −0 Original line number Diff line number Diff line Loading @@ -8494,6 +8494,11 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc mWebView.postInvalidate(); } // Note: must be called before first WebViewClassic is created. public static void setShouldMonitorWebCoreThread() { WebViewCore.setShouldMonitorWebCoreThread(); } private native void nativeCreate(int ptr, String drawableDir, boolean isHighEndGfx); private native void nativeDebugDump(); private native void nativeDestroy(); Loading core/java/android/webkit/WebViewCore.java +16 −3 Original line number Diff line number Diff line Loading @@ -144,6 +144,11 @@ public final class WebViewCore { private int mChromeCanFocusDirection; private int mTextSelectionChangeReason = TextSelectionData.REASON_UNKNOWN; // Used to determine if we should monitor the WebCore thread for responsiveness. // If it "hangs", for example a web page enters a while(true) loop, we will // prompt the user with a dialog allowing them to terminate the process. private static boolean sShouldMonitorWebCoreThread; // The thread name used to identify the WebCore thread and for use in // debugging other classes that require operation within the WebCore thread. /* package */ static final String THREAD_NAME = "WebViewCoreThread"; Loading Loading @@ -176,10 +181,14 @@ public final class WebViewCore { Log.e(LOGTAG, Log.getStackTraceString(e)); } if (sShouldMonitorWebCoreThread) { // Start the singleton watchdog which will monitor the WebCore thread // to verify it's still processing messages. // to verify it's still processing messages. Note that this is the only // time we need to check the value as all the other public methods on // the WebCoreThreadWatchdog are no-ops if start() is not called. WebCoreThreadWatchdog.start(sWebCoreHandler); } } // Make sure the Watchdog is aware of this new WebView. WebCoreThreadWatchdog.registerWebView(w); } Loading Loading @@ -3061,6 +3070,10 @@ public final class WebViewCore { return mDeviceOrientationService; } static void setShouldMonitorWebCoreThread() { sShouldMonitorWebCoreThread = true; } private native void nativeSetIsPaused(int nativeClass, boolean isPaused); private native void nativePause(int nativeClass); private native void nativeResume(int nativeClass); Loading Loading
core/java/android/webkit/WebViewClassic.java +5 −0 Original line number Diff line number Diff line Loading @@ -8494,6 +8494,11 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc mWebView.postInvalidate(); } // Note: must be called before first WebViewClassic is created. public static void setShouldMonitorWebCoreThread() { WebViewCore.setShouldMonitorWebCoreThread(); } private native void nativeCreate(int ptr, String drawableDir, boolean isHighEndGfx); private native void nativeDebugDump(); private native void nativeDestroy(); Loading
core/java/android/webkit/WebViewCore.java +16 −3 Original line number Diff line number Diff line Loading @@ -144,6 +144,11 @@ public final class WebViewCore { private int mChromeCanFocusDirection; private int mTextSelectionChangeReason = TextSelectionData.REASON_UNKNOWN; // Used to determine if we should monitor the WebCore thread for responsiveness. // If it "hangs", for example a web page enters a while(true) loop, we will // prompt the user with a dialog allowing them to terminate the process. private static boolean sShouldMonitorWebCoreThread; // The thread name used to identify the WebCore thread and for use in // debugging other classes that require operation within the WebCore thread. /* package */ static final String THREAD_NAME = "WebViewCoreThread"; Loading Loading @@ -176,10 +181,14 @@ public final class WebViewCore { Log.e(LOGTAG, Log.getStackTraceString(e)); } if (sShouldMonitorWebCoreThread) { // Start the singleton watchdog which will monitor the WebCore thread // to verify it's still processing messages. // to verify it's still processing messages. Note that this is the only // time we need to check the value as all the other public methods on // the WebCoreThreadWatchdog are no-ops if start() is not called. WebCoreThreadWatchdog.start(sWebCoreHandler); } } // Make sure the Watchdog is aware of this new WebView. WebCoreThreadWatchdog.registerWebView(w); } Loading Loading @@ -3061,6 +3070,10 @@ public final class WebViewCore { return mDeviceOrientationService; } static void setShouldMonitorWebCoreThread() { sShouldMonitorWebCoreThread = true; } private native void nativeSetIsPaused(int nativeClass, boolean isPaused); private native void nativePause(int nativeClass); private native void nativeResume(int nativeClass); Loading