| Index: content/browser/browser_main_loop.cc
|
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
|
| index 90c2bf9f0eb3c663980e8d70414f8391f910f59d..8ca5ddd32b3c8e9a1cd8a0628ab95f78b7160436 100644
|
| --- a/content/browser/browser_main_loop.cc
|
| +++ b/content/browser/browser_main_loop.cc
|
| @@ -1069,6 +1069,7 @@ int BrowserMainLoop::CreateThreads() {
|
| // concerns are not a problem in practice.
|
| redirect_thread = false;
|
| message_loop = android::LauncherThread::GetMessageLoop();
|
| + DCHECK(message_loop);
|
| #endif
|
| if (redirect_thread) {
|
| non_ui_non_io_task_runner_traits
|
| @@ -1127,7 +1128,8 @@ int BrowserMainLoop::CreateThreads() {
|
| (*thread_to_start)
|
| .reset(message_loop ? new BrowserProcessSubThread(id, message_loop)
|
| : new BrowserProcessSubThread(id));
|
| - if (!(*thread_to_start)->StartWithOptions(options))
|
| + // Start the thread if an existing |message_loop| wasn't provided.
|
| + if (!message_loop && !(*thread_to_start)->StartWithOptions(options))
|
| LOG(FATAL) << "Failed to start the browser thread: id == " << id;
|
| } else {
|
| scoped_refptr<base::SingleThreadTaskRunner> redirection_task_runner =
|
|
|