0

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:
boliu@chromium.org
2014-08-02 06:13:01 +00:00
parent a632e6816e
commit 36caed781a
2 changed files with 1 additions and 6 deletions
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();
}