| Index: content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java
|
| index b72d60d38a773c08177e797bb2df0e2eeddd8063..56db68e6cd8efc61f9fd2d8ef541736d15eca1e0 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java
|
| @@ -139,7 +139,8 @@ public class BrowserStartupController {
|
| *
|
| * @param callback the callback to be called when browser startup is complete.
|
| */
|
| - public void startBrowserProcessesAsync(final StartupCallback callback) {
|
| + public void startBrowserProcessesAsync(final StartupCallback callback)
|
| + throws ProcessInitException {
|
| assert ThreadUtils.runningOnUiThread() : "Tried to start the browser on the wrong thread.";
|
| if (mStartupDone) {
|
| // Browser process initialization has already been completed, so we can immediately post
|
| @@ -156,7 +157,7 @@ public class BrowserStartupController {
|
| // flag that indicates that we have kicked off starting the browser process.
|
| mHasStartedInitializingBrowserProcess = true;
|
|
|
| - if (!tryPrepareToStartBrowserProcess(MAX_RENDERERS_LIMIT)) return;
|
| + prepareToStartBrowserProcess(MAX_RENDERERS_LIMIT);
|
|
|
| setAsynchronousStartup(true);
|
| if (contentStart() > 0) {
|
| @@ -166,18 +167,6 @@ public class BrowserStartupController {
|
| }
|
| }
|
|
|
| - private boolean tryPrepareToStartBrowserProcess(int maxRenderers) {
|
| - // Make sure that everything is in place to initialize the Android browser process.
|
| - try {
|
| - prepareToStartBrowserProcess(maxRenderers);
|
| - return true;
|
| - } catch (ProcessInitException e) {
|
| - Log.e(TAG, "Unable to load native library.", e);
|
| - enqueueCallbackExecution(STARTUP_FAILURE, NOT_ALREADY_STARTED);
|
| - return false;
|
| - }
|
| - }
|
| -
|
| /**
|
| * Start the browser process synchronously. If the browser is already being started
|
| * asynchronously then complete startup synchronously
|
| @@ -188,14 +177,15 @@ public class BrowserStartupController {
|
| * @param max_renderers The maximum number of renderer processes the browser may
|
| * create. Zero for single process mode.
|
| * @return true if successfully started, false otherwise.
|
| + * @throws ProcessInitException
|
| */
|
| - public boolean startBrowserProcessesSync(int maxRenderers) {
|
| + public boolean startBrowserProcessesSync(int maxRenderers) throws ProcessInitException {
|
| if (mStartupDone) {
|
| // Nothing to do
|
| return mStartupSuccess;
|
| }
|
| if (!mHasStartedInitializingBrowserProcess) {
|
| - if (!tryPrepareToStartBrowserProcess(maxRenderers)) return false;
|
| + prepareToStartBrowserProcess(maxRenderers);
|
| }
|
|
|
| setAsynchronousStartup(false);
|
|
|