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

Unified Diff: android_webview/native/aw_contents.cc

Issue 690553002: aw: Destroy ContentViewCore and WebContents together (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test to ShouldOverrideUrlLoading Created 6 years, 1 month 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 | « android_webview/native/aw_contents.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index b10eeba2e56eabc78a47c4cd4f1ec05e15f60dfa..1bd2808b9a217a4b112a7bfdc4d4a17279127d3e 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -286,22 +286,7 @@ jlong AwContents::GetWebContents(JNIEnv* env, jobject obj) {
void AwContents::Destroy(JNIEnv* env, jobject obj) {
java_ref_.reset();
-
- // We clear the contents_client_bridge_ here so that we break the link with
- // the java peer. This is important for the popup window case, where we are
- // swapping AwContents out that share the same java AwContentsClientBridge.
- // See b/15074651.
- AwContentsClientBridgeBase::Disassociate(web_contents_.get());
- contents_client_bridge_.reset();
-
- // Do not wait until the WebContents are deleted asynchronously to clear
- // the delegate and stop sending callbacks.
- web_contents_->SetDelegate(NULL);
-
- // We do not delete AwContents immediately. Some applications try to delete
- // Webview in ShouldOverrideUrlLoading callback, which is a sync IPC from
- // Webkit.
- BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, this);
+ delete this;
}
static jlong Init(JNIEnv* env, jclass, jobject browser_context) {
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698