Fix testGetVisitedHistoryCallbackAfterDestroy
Crash caused by RenderThreadImpl::OnMemoryPressure being called before blink is initialized. Fix by skipping the crashing code if blink has not been initialized. BUG=398768 Review URL: https://codereview.chromium.org/437623003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287167 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
android_webview/javatests/src/org/chromium/android_webview/test
content/renderer
@ -8,7 +8,6 @@ import android.test.suitebuilder.annotation.SmallTest;
|
||||
import android.webkit.ValueCallback;
|
||||
|
||||
import org.chromium.android_webview.AwContents;
|
||||
import org.chromium.base.test.util.DisabledTest;
|
||||
import org.chromium.base.test.util.Feature;
|
||||
import org.chromium.content.browser.test.util.CallbackHelper;
|
||||
import org.chromium.net.test.util.TestWebServer;
|
||||
@ -158,12 +157,8 @@ public class AwContentsClientVisitedHistoryTest extends AwTestBase {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Feature({"AndroidWebView"})
|
||||
@SmallTest
|
||||
crbug.com/398768
|
||||
*/
|
||||
@DisabledTest
|
||||
public void testGetVisitedHistoryCallbackAfterDestroy() throws Throwable {
|
||||
GetVisitedHistoryHelper visitedHistoryHelper =
|
||||
mContentsClient.getGetVisitedHistoryHelper();
|
||||
|
@ -1531,7 +1531,7 @@ void RenderThreadImpl::OnMemoryPressure(
|
||||
// Trigger full v8 garbage collection on critical memory notification. This
|
||||
// will potentially hang the renderer for a long time, however, when we
|
||||
// receive a memory pressure notification, we might be about to be killed.
|
||||
if (blink::mainThreadIsolate()) {
|
||||
if (webkit_platform_support_ && blink::mainThreadIsolate()) {
|
||||
blink::mainThreadIsolate()->LowMemoryNotification();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user