Commit 1a6618bb authored by Mohamed Heikal's avatar Mohamed Heikal Committed by Commit Bot

Throw RuntimeException if Tab.loadUrl is called and mNativeTabAndroid is 0

Calling Tab.loadUrl if mNativeTabAndroid is 0 would crash chrome. There
has been a few crashes of the sort. This change would make chrome crash
on the Java side rather than the native side so that the java stacktrace
is visible in the crash.

This is a temporary change and will be removed once we have more
information or the bug is closed as WontFix.

Bug: 662877
Change-Id: I0ad62c757d57c11bc405f6b22fad59f047aad527
Reviewed-on: https://chromium-review.googlesource.com/811987Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522444}
parent 34c982d1
......@@ -739,6 +739,13 @@ public class Tab
return handleJavaCrash();
}
if (mNativeTabAndroid == 0) {
// if mNativeTabAndroid is invalid then we are going to crash anyways on the
// native side. Lets crash on the java side so that we can have a better stack
// trace. https://crbug.com/662877
throw new RuntimeException("Please post this crash on crbug.com/662877");
}
// We load the URL from the tab rather than directly from the ContentView so the tab has
// a chance of using a prerenderer page is any.
int loadType = nativeLoadUrl(mNativeTabAndroid, params.getUrl(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment