Chromium Code Reviews| Index: content/browser/renderer_host/java/java_bound_object.h |
| diff --git a/content/browser/renderer_host/java/java_bound_object.h b/content/browser/renderer_host/java/java_bound_object.h |
| index c383f114362f5be393354ce1595172acf3ce4478..109145e11797c9033582e2c7c1efbbf829047a64 100644 |
| --- a/content/browser/renderer_host/java/java_bound_object.h |
| +++ b/content/browser/renderer_host/java/java_bound_object.h |
| @@ -9,6 +9,7 @@ |
| #include <map> |
| #include <string> |
| +#include "base/android/jni_helper.h" |
| #include "base/android/scoped_java_ref.h" |
| #include "base/memory/linked_ptr.h" |
| #include "content/browser/renderer_host/java/java_method.h" |
| @@ -37,9 +38,8 @@ class JavaBoundObject { |
| virtual ~JavaBoundObject(); |
| - // Gets a global ref to the underlying JavaObject from a JavaBoundObject |
| - // wrapped as an NPObject. Ownership of the global ref is retained by the |
| - // JavaBoundObject: the caller must NOT release it. |
| + // Gets a local ref to the underlying JavaObject from a JavaBoundObject |
|
joth
2013/01/07 19:32:41
actually, whether it's local or global is not so i
benm (inactive)
2013/01/08 14:43:05
Will change to SJLR, and add back the NewLocalRef
|
| + // wrapped as an NPObject. |
|
joth
2013/01/07 19:32:41
Mention it may return NULL too, if the native side
benm (inactive)
2013/01/08 14:43:05
Done.
|
| static jobject GetJavaObject(NPObject* object); |
| // Methods to implement the NPObject callbacks. |
| @@ -52,12 +52,12 @@ class JavaBoundObject { |
| const base::android::JavaRef<jobject>& object, |
| base::android::JavaRef<jclass>& safe_annotation_clazz); |
| + |
|
joth
2013/01/07 19:32:41
\n nit
benm (inactive)
2013/01/08 14:43:05
Done.
|
| void EnsureMethodsAreSetUp() const; |
| - // The global ref to the underlying Java object that this JavaBoundObject |
| + // The weak ref to the underlying Java object that this JavaBoundObject |
| // instance represents. |
| - base::android::ScopedJavaGlobalRef<jobject> java_object_; |
| - |
| + JavaObjectWeakGlobalRef 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 |
| // scoped_ptr in STL containers as we can't copy it. |