diff options
author | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-22 13:52:57 +0000 |
---|---|---|
committer | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-22 13:52:57 +0000 |
commit | 6b532429a47bc57fe44a6da06ddc69f4e9300829 (patch) | |
tree | 718e5a087826efd1d7f7ebe0ab3a66881d1c9bc2 /content/browser/renderer_host/java/java_bound_object.h | |
parent | 23bd102d84b2561d5d7a8648a6a725858c47acd7 (diff) | |
download | chromium_src-6b532429a47bc57fe44a6da06ddc69f4e9300829.zip chromium_src-6b532429a47bc57fe44a6da06ddc69f4e9300829.tar.gz chromium_src-6b532429a47bc57fe44a6da06ddc69f4e9300829.tar.bz2 |
Remove env() getter from JavaRef<>
Due to threadsafety ambiguity, it's not generally safe to call env()
on a random Ref you've been passed, so this removes the temptation.
The useful LocalRef optimizations are retained though, just in that
sub-class.
(upstreaming CL, cherrypicked cleanly)
BUG=
TEST=
Review URL: http://codereview.chromium.org/9584014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128204 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/java/java_bound_object.h')
-rw-r--r-- | content/browser/renderer_host/java/java_bound_object.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/content/browser/renderer_host/java/java_bound_object.h b/content/browser/renderer_host/java/java_bound_object.h index 61a1dfb..cf0c403 100644 --- a/content/browser/renderer_host/java/java_bound_object.h +++ b/content/browser/renderer_host/java/java_bound_object.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -44,10 +44,9 @@ class JavaBoundObject { void EnsureMethodsAreSetUp() const; - // Global ref to the underlying Java object. We use a naked jobject, rather - // than a ScopedJavaGlobalRef, as the global ref will be added and dropped on - // different threads. - jobject java_object_; + // The global ref to the underlying Java object that this JavaBoundObject + // instance represents. + base::android::ScopedJavaGlobalRef<jobject> java_object_; // Map of public methods, from method name to Method instance. Multiple // entries will be present for overloaded methods. Note that we can't use |