Index: base/android/scoped_java_ref.h |
diff --git a/base/android/scoped_java_ref.h b/base/android/scoped_java_ref.h |
index 8047ee8c16725ab0470acc1b71dfb77f5594e439..11accf76516311fb83e7c7e0eabfeeae37683c2f 100644 |
--- a/base/android/scoped_java_ref.h |
+++ b/base/android/scoped_java_ref.h |
@@ -10,6 +10,7 @@ |
#include "base/base_export.h" |
#include "base/basictypes.h" |
+#include "base/logging.h" |
namespace base { |
namespace android { |
@@ -46,13 +47,17 @@ class BASE_EXPORT JavaRef<jobject> { |
protected: |
// Initializes a NULL reference. |
- JavaRef(); |
+ JavaRef() : obj_(NULL) {} |
rmcilroy
2015/08/24 16:40:19
Could you add a comment here that no other code sh
|
// Takes ownership of the |obj| reference passed; requires it to be a local |
// reference type. |
+#if DCHECK_IS_ON() |
JavaRef(JNIEnv* env, jobject obj); |
+#else |
+ JavaRef(JNIEnv* env, jobject obj) : obj_(obj) {} |
+#endif |
- ~JavaRef(); |
+ ~JavaRef() {} |
// The following are implementation detail convenience methods, for |
// use by the sub-classes. |