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

Unified Diff: components/cronet/android/java/src/org/chromium/net/CronetLibraryLoader.java

Issue 981013002: [Cronet] Make sure to only pass the application Context to InitApplicationContext to avoid DCHECK fa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add ChromiumUrlRequestContext test too Created 5 years, 9 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: components/cronet/android/java/src/org/chromium/net/CronetLibraryLoader.java
diff --git a/components/cronet/android/java/src/org/chromium/net/CronetLibraryLoader.java b/components/cronet/android/java/src/org/chromium/net/CronetLibraryLoader.java
index eb5428cf1f904bc933b39bf9bf9a4f7c565d42f0..383d94698a1bfcd151eec69c9c0295901fd7e444 100644
--- a/components/cronet/android/java/src/org/chromium/net/CronetLibraryLoader.java
+++ b/components/cronet/android/java/src/org/chromium/net/CronetLibraryLoader.java
@@ -62,9 +62,9 @@ class CronetLibraryLoader {
// NetworkChangeNotifierAndroid is created, so as to avoid receiving
// the undesired initial network change observer notification, which
// will cause active requests to fail with ERR_NETWORK_CHANGED.
- nativeCronetInitOnMainThread(context);
+ nativeCronetInitOnMainThread(context.getApplicationContext());
}
// Native methods are implemented in cronet_loader.cc.
- private static native void nativeCronetInitOnMainThread(Context context);
+ private static native void nativeCronetInitOnMainThread(Context appContext);
}

Powered by Google App Engine
This is Rietveld 408576698