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

Unified Diff: android/scoped_java_ref.h

Issue 2045223003: Update to Chromium //base at Chromium commit 82baa9afc6620c68cb2168f20bb65e77e3e57f0a. (Closed) Base URL: https://github.com/domokit/base.git@master
Patch Set: Created 4 years, 6 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 | « android/java/src/org/chromium/base/PathUtils.java ('k') | basictypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android/scoped_java_ref.h
diff --git a/android/scoped_java_ref.h b/android/scoped_java_ref.h
index 62749693fd7ed52258ad05e68b269fde29c20fda..94f94f5629e1759e8a8359c8b81f4528c73f0100 100644
--- a/android/scoped_java_ref.h
+++ b/android/scoped_java_ref.h
@@ -193,6 +193,13 @@ class ScopedJavaLocalRef : public JavaRef<T> {
// This class is only good for use on the thread it was created on so
// it's safe to cache the non-threadsafe JNIEnv* inside this object.
JNIEnv* env_;
+
+ // Prevent ScopedJavaLocalRef(JNIEnv*, T obj) from being used to take
+ // ownership of a JavaParamRef's underlying object - parameters are not
+ // allowed to be deleted and so should not be owned by ScopedJavaLocalRef.
+ // TODO(torne): this can be removed once JavaParamRef no longer has an
+ // implicit conversion back to T.
+ ScopedJavaLocalRef(JNIEnv* env, const JavaParamRef<T>& other);
};
// Holds a global reference to a Java object. The global reference is scoped
« no previous file with comments | « android/java/src/org/chromium/base/PathUtils.java ('k') | basictypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698