OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.content.app; | 5 package org.chromium.content.app; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.content.Intent; | 8 import android.content.Intent; |
9 import android.graphics.SurfaceTexture; | 9 import android.graphics.SurfaceTexture; |
10 import android.os.Binder; | 10 import android.os.Binder; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 } | 174 } |
175 } | 175 } |
176 boolean isLoaded = false; | 176 boolean isLoaded = false; |
177 if (CommandLine.getInstance().hasSwitch( | 177 if (CommandLine.getInstance().hasSwitch( |
178 BaseSwitches.RENDERER_WAIT_FOR_JAVA_DEBUGGER)) { | 178 BaseSwitches.RENDERER_WAIT_FOR_JAVA_DEBUGGER)) { |
179 android.os.Debug.waitForDebugger(); | 179 android.os.Debug.waitForDebugger(); |
180 } | 180 } |
181 | 181 |
182 boolean loadAtFixedAddressFailed = false; | 182 boolean loadAtFixedAddressFailed = false; |
183 try { | 183 try { |
184 LibraryLoader.get(mLibraryProcessType).loadNow(hostBrows erContext); | 184 LibraryLoader.get(mLibraryProcessType).loadNow(); |
Ted C
2016/09/21 18:36:51
this seems like it is changing the behavior. prev
Xi Han
2016/09/21 18:52:27
Thank you Ted for sending this CL to me!
The |hos
Ted C
2016/09/21 19:04:18
What process do webappks generate their renderers
Xi Han
2016/09/21 19:37:24
In WebAPK's AndroidManifest.xml, we declares WebAp
Peter Wen
2016/09/26 19:02:01
Opps, didn't mean to make this change in behaviour
| |
185 isLoaded = true; | 185 isLoaded = true; |
186 } catch (ProcessInitException e) { | 186 } catch (ProcessInitException e) { |
187 if (requestedSharedRelro) { | 187 if (requestedSharedRelro) { |
188 Log.w(TAG, "Failed to load native library with share d RELRO, " | 188 Log.w(TAG, "Failed to load native library with share d RELRO, " |
189 + "retrying without"); | 189 + "retrying without"); |
190 loadAtFixedAddressFailed = true; | 190 loadAtFixedAddressFailed = true; |
191 } else { | 191 } else { |
192 Log.e(TAG, "Failed to load native library", e); | 192 Log.e(TAG, "Failed to load native library", e); |
193 } | 193 } |
194 } | 194 } |
195 if (!isLoaded && requestedSharedRelro) { | 195 if (!isLoaded && requestedSharedRelro) { |
196 linker.disableSharedRelros(); | 196 linker.disableSharedRelros(); |
197 try { | 197 try { |
198 LibraryLoader.get(mLibraryProcessType).loadNow(hostB rowserContext); | 198 LibraryLoader.get(mLibraryProcessType).loadNow(); |
199 isLoaded = true; | 199 isLoaded = true; |
200 } catch (ProcessInitException e) { | 200 } catch (ProcessInitException e) { |
201 Log.e(TAG, "Failed to load native library on retry", e); | 201 Log.e(TAG, "Failed to load native library on retry", e); |
202 } | 202 } |
203 } | 203 } |
204 if (!isLoaded) { | 204 if (!isLoaded) { |
205 System.exit(-1); | 205 System.exit(-1); |
206 } | 206 } |
207 LibraryLoader.get(mLibraryProcessType) | 207 LibraryLoader.get(mLibraryProcessType) |
208 .registerRendererProcessHistogram(requestedSharedRel ro, | 208 .registerRendererProcessHistogram(requestedSharedRel ro, |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
451 private static native void nativeInitChildProcessImpl( | 451 private static native void nativeInitChildProcessImpl( |
452 ChildProcessServiceImpl serviceImpl, int cpuCount, long cpuFeatures) ; | 452 ChildProcessServiceImpl serviceImpl, int cpuCount, long cpuFeatures) ; |
453 | 453 |
454 /** | 454 /** |
455 * Force the child process to exit. | 455 * Force the child process to exit. |
456 */ | 456 */ |
457 private static native void nativeExitChildProcess(); | 457 private static native void nativeExitChildProcess(); |
458 | 458 |
459 private native void nativeShutdownMainThread(); | 459 private native void nativeShutdownMainThread(); |
460 } | 460 } |
OLD | NEW |