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

Unified Diff: base/android/context_utils.cc

Issue 2231923002: Make GetApplicationContext return a JavaRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also fix not-currently-compiled unit test Created 4 years, 4 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
Index: base/android/context_utils.cc
diff --git a/base/android/context_utils.cc b/base/android/context_utils.cc
index e9ab723fdf93ab999cf4c2e73881e2fc219f7b15..e2c4ed0b4b80ad2f95eba38d22a4f7da71ee2b69 100644
--- a/base/android/context_utils.cc
+++ b/base/android/context_utils.cc
@@ -33,9 +33,9 @@ void SetNativeApplicationContext(JNIEnv* env, const JavaRef<jobject>& context) {
} // namespace
-jobject GetApplicationContext() {
+const JavaRef<jobject>& GetApplicationContext() {
DCHECK(!g_application_context.Get().is_null());
- return g_application_context.Get().obj();
+ return g_application_context.Get();
}
static void InitNativeSideApplicationContext(

Powered by Google App Engine
This is Rietveld 408576698