Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(577)

Unified Diff: content/browser/browser_main_loop.cc

Issue 2808343004: android: Fix java launcher thread (Closed)
Patch Set: review comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/android/launcher_thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 =
« no previous file with comments | « content/browser/android/launcher_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698