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

Unified Diff: content/shell/android/shell_manager.cc

Issue 1294333002: Fix wrong usages of ScopedJavaLocalRef::Release(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment to Release() explaining it should not be used to call java methods 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/shell/android/shell_manager.h ('k') | content/shell/browser/shell_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/shell_manager.cc
diff --git a/content/shell/android/shell_manager.cc b/content/shell/android/shell_manager.cc
index 3a22db00917c91d7ac14b9117e88329574878b0b..b262c883eddaf46d56b87dfd5f79dd9ba1f66e2f 100644
--- a/content/shell/android/shell_manager.cc
+++ b/content/shell/android/shell_manager.cc
@@ -31,13 +31,11 @@ base::LazyInstance<GlobalState> g_global_state = LAZY_INSTANCE_INITIALIZER;
namespace content {
-jobject CreateShellView(Shell* shell) {
+ScopedJavaLocalRef<jobject> CreateShellView(Shell* shell) {
JNIEnv* env = base::android::AttachCurrentThread();
jobject j_shell_manager = g_global_state.Get().j_shell_manager.obj();
- return Java_ShellManager_createShell(
- env,
- j_shell_manager,
- reinterpret_cast<intptr_t>(shell)).Release();
+ return Java_ShellManager_createShell(env, j_shell_manager,
+ reinterpret_cast<intptr_t>(shell));
}
void RemoveShellView(jobject shell_view) {
« no previous file with comments | « content/shell/android/shell_manager.h ('k') | content/shell/browser/shell_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698