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

Issue 2808343004: android: Fix java launcher thread (Closed)

Created:
3 years, 8 months ago by boliu
Modified:
3 years, 8 months ago
Reviewers:
gab
CC:
chromium-reviews, jam, darin-cc_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

android: Fix java launcher thread This is a follow up fix for refs/heads/master@{#460509} which is not correct: * content::android::LauncherThread never starts the thread, so GetMessageLoop just returns null. * This of course causes an actual native thread to be started for launcher thread in BrowserMainLoop::CreateThreads. Fix does this: * content::android::LauncherThread calls Start on construction so GetMessageLoop no longer returns null. * Make sure Start is not called on BrowserProcessSubThread for launcher thread. This matches behavior in BrowserMainLoop::InitializeMainThread for the UI thread. Luckily we have not removed any thread safety code in this time, so looks like this mistake has not caused huge issues. BUG=701442 Review-Url: https://codereview.chromium.org/2808343004 Cr-Commit-Position: refs/heads/master@{#464466} Committed: https://chromium.googlesource.com/chromium/src/+/311458dc726c28f8d091aa496ca6ce70778269ef

Patch Set 1 #

Total comments: 4

Patch Set 2 : review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -2 lines) Patch
M content/browser/android/launcher_thread.cc View 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 19 (10 generated)
boliu
PTAL Found this when I was adding thread asserts and realized native calls doesn't assert ...
3 years, 8 months ago (2017-04-12 18:31:42 UTC) #4
gab
Re. * Make sure Start is not called on BrowserProcessSubThread for launcher thread. This matches ...
3 years, 8 months ago (2017-04-12 19:29:06 UTC) #5
boliu
On 2017/04/12 19:29:06, gab wrote: > Re. * Make sure Start is not called on ...
3 years, 8 months ago (2017-04-12 19:43:43 UTC) #8
boliu
On 2017/04/12 19:43:43, boliu wrote: > On 2017/04/12 19:29:06, gab wrote: > > Re. * ...
3 years, 8 months ago (2017-04-12 19:53:27 UTC) #9
gab
lgtm w/ comment https://codereview.chromium.org/2808343004/diff/1/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2808343004/diff/1/content/browser/browser_main_loop.cc#newcode1130 content/browser/browser_main_loop.cc:1130: if (!message_loop && !(*thread_to_start)->StartWithOptions(options)) Ah I ...
3 years, 8 months ago (2017-04-13 15:39:12 UTC) #11
gab
https://codereview.chromium.org/2808343004/diff/1/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2808343004/diff/1/content/browser/browser_main_loop.cc#newcode1071 content/browser/browser_main_loop.cc:1071: message_loop = android::LauncherThread::GetMessageLoop(); DCHECK(message_loop); here maybe?
3 years, 8 months ago (2017-04-13 15:40:04 UTC) #12
boliu
thanks! https://codereview.chromium.org/2808343004/diff/1/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2808343004/diff/1/content/browser/browser_main_loop.cc#newcode1071 content/browser/browser_main_loop.cc:1071: message_loop = android::LauncherThread::GetMessageLoop(); On 2017/04/13 15:40:04, gab wrote: ...
3 years, 8 months ago (2017-04-13 16:30:05 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2808343004/20001
3 years, 8 months ago (2017-04-13 16:31:00 UTC) #16
commit-bot: I haz the power
3 years, 8 months ago (2017-04-13 18:11:28 UTC) #19
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/311458dc726c28f8d091aa496ca6...

Powered by Google App Engine
This is Rietveld 408576698