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

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

Issue 1308363003: Revert of jni_generator: Make all object-returning natives return ScopedJavaLocalRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « content/browser/android/content_video_view.cc ('k') | content/browser/android/content_view_statics.cc » ('j') | 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 a1a84e762df42d9d9a215623208d781b26f21494..dd9bab868ac8c7921370b381c6b292f95a86996b 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -1463,17 +1463,19 @@
return reinterpret_cast<intptr_t>(view);
}
-static ScopedJavaLocalRef<jobject>
-FromWebContentsAndroid(JNIEnv* env, jclass clazz, jobject jweb_contents) {
+static jobject FromWebContentsAndroid(
+ JNIEnv* env,
+ jclass clazz,
+ jobject jweb_contents) {
WebContents* web_contents = WebContents::FromJavaWebContents(jweb_contents);
if (!web_contents)
- return ScopedJavaLocalRef<jobject>();
+ return NULL;
ContentViewCore* view = ContentViewCore::FromWebContents(web_contents);
if (!view)
- return ScopedJavaLocalRef<jobject>();
-
- return view->GetJavaObject();
+ return NULL;
+
+ return view->GetJavaObject().Release();
}
bool RegisterContentViewCore(JNIEnv* env) {
« no previous file with comments | « content/browser/android/content_video_view.cc ('k') | content/browser/android/content_view_statics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698