Chromium Code Reviews| Index: android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java |
| diff --git a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java |
| index fd8040bed9b4774c2c52f9b4c94e5a281b3b9efb..b42f4d972804f168a69fc6c0e593cd22bdab7d09 100644 |
| --- a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java |
| +++ b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java |
| @@ -9,6 +9,7 @@ import android.os.StrictMode; |
| import org.chromium.android_webview.policy.AwPolicyProvider; |
| import org.chromium.base.CommandLine; |
| +import org.chromium.base.ContextUtils; |
| import org.chromium.base.Log; |
| import org.chromium.base.PathUtils; |
| import org.chromium.base.ThreadUtils; |
| @@ -40,14 +41,12 @@ public abstract class AwBrowserProcess { |
| * Note: it is up to the caller to ensure this is only called once. |
| */ |
| public static void loadLibrary(Context context) { |
| + ContextUtils.initApplicationContext(context.getApplicationContext()); |
| PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, context); |
| try { |
| LibraryLoader libraryLoader = LibraryLoader.get(LibraryProcessType.PROCESS_WEBVIEW); |
| libraryLoader.loadNow(context); |
| - // Switch the command line implementation from Java to native. |
| - // It's okay for the WebView to do this before initialization because we have |
| - // setup the JNI bindings by this point. |
| - libraryLoader.switchCommandLineForWebView(); |
| + libraryLoader.initialize(); |
|
Torne
2016/04/15 14:22:43
It doesn't seem like this is safe to do here. The
Peter Wen
2016/04/18 18:49:58
Reverted.
Thanks, consolidated the two paths so i
|
| } catch (ProcessInitException e) { |
| throw new RuntimeException("Cannot load WebView", e); |
| } |