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

Unified Diff: android_webview/native/aw_contents_client_bridge.cc

Issue 2295693004: Pass JavaRef to Java methods in android_webview. (Closed)
Patch Set: Created 4 years, 4 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
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 c428f2421855da288ff88fe0b88b98e6f908308b..9de58888c52abdacf83285c2a0372e7486b4ae4d 100644
--- a/android_webview/native/aw_contents_client_bridge.cc
+++ b/android_webview/native/aw_contents_client_bridge.cc
@@ -52,9 +52,10 @@ void RecordClientCertificateKey(
} // namespace
-AwContentsClientBridge::AwContentsClientBridge(JNIEnv* env, jobject obj)
+AwContentsClientBridge::AwContentsClientBridge(JNIEnv* env,
+ const JavaRef<jobject>& obj)
: java_ref_(env, obj) {
- DCHECK(obj);
+ DCHECK(!obj.is_null());
Java_AwContentsClientBridge_setNativeContentsClientBridge(
env, obj, reinterpret_cast<intptr_t>(this));
}
« no previous file with comments | « android_webview/native/aw_contents_client_bridge.h ('k') | android_webview/native/aw_contents_client_bridge_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698