Index: chrome/browser/android/tab_android.cc |
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc |
index e9289de54c9a5f06a4fc4123ab76799c2c6482d4..c6d89f57f771171e7ba467fbd41163a7b04ff067 100644 |
--- a/chrome/browser/android/tab_android.cc |
+++ b/chrome/browser/android/tab_android.cc |
@@ -844,7 +844,8 @@ void TabAndroid::DetachOverlayContentViewCore(JNIEnv* env, |
jcontent_view_core); |
DCHECK(content_view_core); |
- content_view_core->GetLayer()->RemoveFromParent(); |
+ if (content_view_core->GetLayer()->parent() == content_layer_) |
+ content_view_core->GetLayer()->RemoveFromParent(); |
} |
static void Init(JNIEnv* env, jobject obj) { |