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

Unified Diff: android_webview/native/aw_contents_client_bridge.cc

Issue 545963002: Android WebView: clean up the AwContentsClientBridge webcontents userdata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add another missing callback run Created 6 years, 3 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 | « android_webview/native/aw_contents.cc ('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_client_bridge.cc
diff --git a/android_webview/native/aw_contents_client_bridge.cc b/android_webview/native/aw_contents_client_bridge.cc
index 5431be749a6302a14e7762d752257d4e648ba6c7..f5bccdffd86bc6a5b25f4c1c3d1df2e9796dc373 100644
--- a/android_webview/native/aw_contents_client_bridge.cc
+++ b/android_webview/native/aw_contents_client_bridge.cc
@@ -262,8 +262,10 @@ void AwContentsClientBridge::RunJavaScriptDialog(
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
- if (obj.is_null())
+ if (obj.is_null()) {
+ callback.Run(false, base::string16());
return;
+ }
int callback_id = pending_js_dialog_callbacks_.Add(
new content::JavaScriptDialogManager::DialogClosedCallback(callback));
@@ -310,8 +312,10 @@ void AwContentsClientBridge::RunBeforeUnloadDialog(
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
- if (obj.is_null())
+ if (obj.is_null()) {
+ callback.Run(false, base::string16());
return;
+ }
int callback_id = pending_js_dialog_callbacks_.Add(
new content::JavaScriptDialogManager::DialogClosedCallback(callback));
« no previous file with comments | « android_webview/native/aw_contents.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698