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

Unified Diff: content/app/android/child_process_service.cc

Issue 1324453006: jni: Remove no-longer-needed calls to NewLocalRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | content/app/android/content_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/android/child_process_service.cc
diff --git a/content/app/android/child_process_service.cc b/content/app/android/child_process_service.cc
index 68bf0c00d948ce7171f6a55183fb3b98a65c3ac7..2ac9ef4c77b87d235579db87ffc2387141a713fd 100644
--- a/content/app/android/child_process_service.cc
+++ b/content/app/android/child_process_service.cc
@@ -38,7 +38,7 @@ class SurfaceTextureManagerImpl : public SurfaceTextureManager,
// |service| is the instance of
// org.chromium.content.app.ChildProcessService.
explicit SurfaceTextureManagerImpl(
- const base::android::ScopedJavaLocalRef<jobject>& service)
+ const base::android::JavaRef<jobject>& service)
: service_(service) {
SurfaceTexturePeer::InitInstance(this);
GpuSurfaceLookup::InitInstance(this);
@@ -132,13 +132,9 @@ class SurfaceTextureManagerImpl : public SurfaceTextureManager,
// Chrome actually uses the renderer code path for all of its child
// processes such as renderers, plugins, etc.
void InternalInitChildProcess(JNIEnv* env,
- jclass clazz,
- jobject service_in,
+ const JavaParamRef<jobject>& service,
jint cpu_count,
jlong cpu_features) {
- base::android::ScopedJavaLocalRef<jobject> service(
- env, env->NewLocalRef(service_in));
-
// Set the CPU properties.
android_setCpu(cpu_count, cpu_features);
SurfaceTextureManager::SetInstance(new SurfaceTextureManagerImpl(service));
@@ -163,7 +159,7 @@ void InitChildProcess(JNIEnv* env,
const JavaParamRef<jobject>& service,
jint cpu_count,
jlong cpu_features) {
- InternalInitChildProcess(env, clazz, service, cpu_count, cpu_features);
+ InternalInitChildProcess(env, service, cpu_count, cpu_features);
}
void ExitChildProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) {
« no previous file with comments | « no previous file | content/app/android/content_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698