| Index: content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
|
| diff --git a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
|
| index ddf549873df2bb7418cea3b3026b123351db62a2..f09afcb75c53fc9883216458d86025337d1d9ec4 100644
|
| --- a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
|
| +++ b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
|
| @@ -60,7 +60,9 @@ public class ContentShellActivity extends Activity {
|
| LibraryLoader.ensureInitialized();
|
| } catch (ProcessInitException e) {
|
| Log.e(TAG, "ContentView initialization failed.", e);
|
| - finish();
|
| + // Since the library failed to initialize nothing in the application
|
| + // can work, so kill the whole application not just the activity
|
| + System.exit(-1);
|
| return;
|
| }
|
|
|
| @@ -76,25 +78,37 @@ public class ContentShellActivity extends Activity {
|
| }
|
|
|
| if (CommandLine.getInstance().hasSwitch(CommandLine.DUMP_RENDER_TREE)) {
|
| - if(BrowserStartupController.get(this).startBrowserProcessesSync(
|
| - BrowserStartupController.MAX_RENDERERS_LIMIT)) {
|
| - finishInitialization(savedInstanceState);
|
| - } else {
|
| - initializationFailed();
|
| - }
|
| - } else {
|
| - BrowserStartupController.get(this).startBrowserProcessesAsync(
|
| - new BrowserStartupController.StartupCallback() {
|
| - @Override
|
| - public void onSuccess(boolean alreadyStarted) {
|
| + try {
|
| + if(BrowserStartupController.get(this).startBrowserProcessesSync(
|
| + BrowserStartupController.MAX_RENDERERS_LIMIT)) {
|
| finishInitialization(savedInstanceState);
|
| - }
|
| -
|
| - @Override
|
| - public void onFailure() {
|
| + } else {
|
| initializationFailed();
|
| }
|
| - });
|
| + }
|
| + catch (ProcessInitException e) {
|
| + Log.e(TAG, "Failed to load native library.", e);
|
| + System.exit(-1);
|
| + }
|
| + } else {
|
| + try {
|
| + BrowserStartupController.get(this).startBrowserProcessesAsync(
|
| + new BrowserStartupController.StartupCallback() {
|
| + @Override
|
| + public void onSuccess(boolean alreadyStarted) {
|
| + finishInitialization(savedInstanceState);
|
| + }
|
| +
|
| + @Override
|
| + public void onFailure() {
|
| + initializationFailed();
|
| + }
|
| + });
|
| + }
|
| + catch (ProcessInitException e) {
|
| + Log.e(TAG, "Unable to load native library.", e);
|
| + System.exit(-1);
|
| + }
|
| }
|
| }
|
|
|
|
|