summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-16 04:51:03 +0000
committerboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-16 04:51:03 +0000
commitd2c58efd51e3b523954f47383e5cf1cc3eb4b407 (patch)
treeb227c7e3e72eb3181a7a853d87a33a68cf178911
parent2d98dbcde8b789ae1ce87083695ed0f4e0b35e19 (diff)
downloadchromium_src-d2c58efd51e3b523954f47383e5cf1cc3eb4b407.zip
chromium_src-d2c58efd51e3b523954f47383e5cf1cc3eb4b407.tar.gz
chromium_src-d2c58efd51e3b523954f47383e5cf1cc3eb4b407.tar.bz2
Fix AwContentsTest#testCreateDestroy flaky crash
Apparently onSizeChanged can be called after destroy, so we need a check here. BUG= Android Java only change. Ran through instrumentation fyi bot. NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11414022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168137 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--android_webview/java/src/org/chromium/android_webview/AwContents.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index cffd535..2e2ab88 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -593,6 +593,7 @@ public class AwContents {
* @see android.view.View#onSizeChanged()
*/
public void onSizeChanged(int w, int h, int ow, int oh) {
+ if (mNativeAwContents == 0) return;
mContentViewCore.onSizeChanged(w, h, ow, oh);
nativeOnSizeChanged(mNativeAwContents, w, h, ow, oh);
}