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

Issue 2407313002: Disallow nesting on some BrowserThreads. (Closed)

Created:
4 years, 2 months ago by fdoray
Modified:
4 years, 2 months ago
Reviewers:
jam
CC:
chromium-reviews, darin-cc_chromium.org, sadrul
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Disallow nesting on some BrowserThreads. This CL disallows nesting on BrowserThreads that will be migrated to TaskScheduler. Running a nested loop or calling Add/RemoveNestingObserver on these threads will result in a crash. To our knowledge, no code runs a nested loop on BrowserThreads that will be migrated to TaskScheduler. This CL will help us confirm that in the wild. BUG=653916 Committed: https://crrev.com/6d547b63b4176785a3caf5019c055173a28535e8 Cr-Commit-Position: refs/heads/master@{#424749}

Patch Set 1 #

Patch Set 2 : self-review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -0 lines) Patch
M base/message_loop/message_loop.h View 2 chunks +7 lines, -0 lines 0 comments Download
M base/message_loop/message_loop.cc View 1 3 chunks +6 lines, -0 lines 0 comments Download
M content/browser/browser_thread_impl.cc View 1 chunk +8 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 18 (9 generated)
fdoray
PTAL
4 years, 2 months ago (2016-10-11 18:46:42 UTC) #8
jam
Sorry for repeating the question from the other cl, but I saw this after. I'm ...
4 years, 2 months ago (2016-10-11 19:25:52 UTC) #9
fdoray
On 2016/10/11 19:25:52, jam wrote: > Sorry for repeating the question from the other cl, ...
4 years, 2 months ago (2016-10-11 19:39:14 UTC) #10
jam
lgtm On 2016/10/11 19:39:14, fdoray wrote: > On 2016/10/11 19:25:52, jam wrote: > > Sorry ...
4 years, 2 months ago (2016-10-11 21:25:45 UTC) #11
fdoray
On 2016/10/11 21:25:45, jam wrote: > lgtm > > On 2016/10/11 19:39:14, fdoray wrote: > ...
4 years, 2 months ago (2016-10-12 15:46:25 UTC) #12
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/2407313002/20001
4 years, 2 months ago (2016-10-12 15:46:43 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 2 months ago (2016-10-12 15:52:59 UTC) #15
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/6d547b63b4176785a3caf5019c055173a28535e8 Cr-Commit-Position: refs/heads/master@{#424749}
4 years, 2 months ago (2016-10-12 15:55:31 UTC) #17
robliao
4 years, 2 months ago (2016-10-12 17:13:53 UTC) #18
Message was sent while issue was closed.
On 2016/10/12 15:46:25, fdoray wrote:
> On 2016/10/11 21:25:45, jam wrote:
> > lgtm
> > 
> > On 2016/10/11 19:39:14, fdoray wrote:
> > > On 2016/10/11 19:25:52, jam wrote:
> > > > Sorry for repeating the question from the other cl, but I saw this
after.
> > > > 
> > > > I'm curious the IO thread uses nestable message loops?
> > > 
> > > I don't know if the IO thread uses nestable message loops. We don't need
to
> > > disallow it since, unlike other browser threads, we don't plan to migrate
> the
> > IO
> > > thread to TaskScheduler anytime 
> > 
> > I'm curious why? Is it because you want TaskScheduler to just be a generic
> > message pump and not have to worry about OS-specific messages like window
> > message, I/O etc?
> > 
> > > Do you want me to find out whether nested
> > > loops are used on the IO thread?
> > 
> > no need to
> 
> To my knowledge, it's because the IO thread has subtle interactions with the
OS
> that we don't want to mess with. I asked robliao@ to provide a more thorough
> answer.

The main reason why we deferred migrating the IO thread is primarily because it
required callback support to handle the IPCs, something not originally handled
in the scheduler thread pools.
Not handling callbacks was sufficient to handle all browser threads except for
the UI and IO threads. All other browser threads didn't have this requirement.

We can investigate what it would take to move the IO thread after we've removed
the other named browser threads.

Powered by Google App Engine
This is Rietveld 408576698