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

Unified Diff: android/scoped_java_ref.cc

Issue 2045303002: Update to Chromium //base at Chromium commit 3e81715e6d3a4324362635aea46ce1f1a163cca1. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/domokit/base@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/scoped_java_ref.h ('k') | debug/debugger_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android/scoped_java_ref.cc
diff --git a/android/scoped_java_ref.cc b/android/scoped_java_ref.cc
index bb6f5032fe3454dfc2011c5a6a38c603714a84c5..4d4ef6da191ecba41239f0c7578f57d5e1204571 100644
--- a/android/scoped_java_ref.cc
+++ b/android/scoped_java_ref.cc
@@ -28,16 +28,15 @@ ScopedJavaLocalFrame::ScopedJavaLocalFrame(JNIEnv* env, int capacity)
ScopedJavaLocalFrame::~ScopedJavaLocalFrame() { env_->PopLocalFrame(NULL); }
-JavaRef<jobject>::JavaRef() : obj_(NULL) {}
-
+#if DCHECK_IS_ON()
+// This constructor is inlined when DCHECKs are disabled; don't add anything
+// else here.
JavaRef<jobject>::JavaRef(JNIEnv* env, jobject obj) : obj_(obj) {
if (obj) {
DCHECK(env && env->GetObjectRefType(obj) == JNILocalRefType);
}
}
-
-JavaRef<jobject>::~JavaRef() {
-}
+#endif
JNIEnv* JavaRef<jobject>::SetNewLocalRef(JNIEnv* env, jobject obj) {
if (!env) {
« no previous file with comments | « android/scoped_java_ref.h ('k') | debug/debugger_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698