Index: chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java b/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java |
index 1a01f34194caf9cd47fdaec42330b6c746839fdc..87bc0800cc2612e0efbec4ed89bdb2bb34748874 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java |
@@ -312,7 +312,14 @@ public class ChromeBrowserInitializer { |
}); |
// See crbug.com/593250. This can be removed after N SDK is released, crbug.com/592722. |
- ChildProcessCreationParams.set(mApplication.getChildProcessCreationParams()); |
+ ChildProcessCreationParams creationParams = mApplication.getChildProcessCreationParams(); |
+ // WebAPK uses this code path to initialize Chrome's native code, and the |
+ // ChildProcessCreationParams has been set in {@link WebApkActivity}. We have to prevent |
+ // resetting with a wrong parameter here. TODO(hanxi): Remove the entire if block after |
+ // N SDK is released, since it breaks WebAPKs on N+. |
+ if (creationParams != null && ChildProcessCreationParams.get() != null) { |
+ ChildProcessCreationParams.set(creationParams); |
no sievers
2016/06/24 21:33:40
Is this still needed?
Xi Han
2016/06/24 21:57:06
Since I am not sure whether we can remove ChildPro
|
+ } |
if (isAsync) { |
// We want to start this queue once the C++ startup tasks have run; allow the |
// C++ startup to run asynchonously, and set it up to start the Java queue once |