GetCurrentThreadSerialEventTarget() doesn't return what you expect (part 2)
Categories
(Core :: XPCOM, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: jya, Assigned: jya)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
In bug 1637500 we made sure that GetCurrentSerialEventTarget returned the properly value with:
- TaskQueue
- STS
- XPCOMThreadWrapper/AbstractThread
We had a pending P5 change that made the DocGroup's serial event target being returned however, as mentioned by :nika we want to keep returning the actual main thread.
We also covered the MessageLoop::EventTarget; however, we want to return the actual XPCOM nsThread if used by the MessageLoop.
In the case where the MessageLoop doesn't have a XPCOM nsThread; we wants to return the MessageLoop's EventTarget.
This will also cover cases where in process with XPCOM not initilised (such as GMP); GetCurrentSerialEventTarget will return a non-null value.
Assignee | ||
Comment 1•4 years ago
|
||
EventTarget::Dispatch can be called on any threads ; there's a potential of a race when accessing the mLoop member.
Assignee | ||
Comment 2•4 years ago
|
||
It can be used to wrap a Runnable and set the CurrentSerialEventTarget TLS for the duration of the runnable's run and so that it returns the right value when called.
Assignee | ||
Comment 3•4 years ago
|
||
We want it to returning the actual nsThread if that's where the MessageLoop would dispatch its tasks; otherwise return the MessageLoop's EventTarget
Depends on D80357
Comment 5•4 years ago
|
||
Backed out 2 changesets (bug 1647958) for conflicting with the backout of Bug 1648898.
https://hg.mozilla.org/integration/autoland/rev/a4619f6a9a75434109982924d7e0809358c20adf
Failure log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=307992480&repo=autoland&lineNumber=1654
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1080acf92cfc
https://hg.mozilla.org/mozilla-central/rev/9a07058c8c33
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Description
•