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) { |