Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 133073012: android: Fix ContentViewCore and RenderWidgetHostViewAndroid lifetime issue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ContentViewCoreImpl is already a WebContentsObserver Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 4cb6da8994f4dd65a52654b0104c558c83adf513..72febdbf15a0e4f70b6ed46509783c646f31fb32 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -1679,6 +1679,13 @@ void ContentViewCoreImpl::OnSmartClipDataExtracted(
env, obj.obj(), jresult.obj());
}
+void ContentViewCoreImpl::WebContentsDestroyed(WebContents* web_contents) {
+ WebContentsViewAndroid* wcva =
+ static_cast<WebContentsViewAndroid*>(web_contents->GetView());
+ DCHECK(wcva);
+ wcva->SetContentViewCore(NULL);
+}
+
// This is called for each ContentView.
jlong Init(JNIEnv* env, jobject obj,
jboolean hardware_accelerated,
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698