Closed
Bug 1391865
Opened 6 years ago
Closed 6 years ago
Use same PBackgroundChild for all cooperative threads
Categories
(Core :: IPC, enhancement)
Core
IPC
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: billm, Assigned: billm)
References
Details
Attachments
(1 file)
4.47 KB,
patch
|
bevis
:
review+
|
Details | Diff | Splinter Review |
Originally we talked about using one PBackgroundChild actor for each cooperative thread. However, this won't work. All the cooperative threads share a single event queue. Suppose that one PBackgroundChild sent a message to the background thread. It might be received on a different cooperative thread, which would have a different PBackgroundChild stored in its TLS. Even if we made it work, it would be very confusing. This patch makes us use a single PBackgroundChild actor for all the main threads. It does so by storing the PBackgroundChild actor for the main thread in a global variable instead of in TLS.
Attachment #8899030 -
Flags: review?(btseng)
Comment 1•6 years ago
|
||
Comment on attachment 8899030 [details] [diff] [review] patch Review of attachment 8899030 [details] [diff] [review]: ----------------------------------------------------------------- ::: ipc/glue/BackgroundImpl.cpp @@ +1603,5 @@ > // static > void > ChildImpl::CloseForCurrentThread() > { > + MOZ_ASSERT(!NS_IsMainThread()); nit: MOZ_ASSERT(!NS_IsMainThread(), "The TLS on the main thread shall always be closed from ChildImpl::Shutdown().");
Attachment #8899030 -
Flags: review?(btseng) → review+
Pushed by wmccloskey@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f7ed5293a8cd Use same PBackground for all cooperative threads (r=bevis)
Comment 3•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f7ed5293a8cd
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•