Remove TaskQueue::EventTargetWrapper
Categories
(Core :: XPCOM, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: jya, Assigned: jya)
References
Details
Attachments
(2 files)
TaskQueue is already a nsISerialEventTarget ; there's no need to wrap it in another nsISerialEventTarget.
I can't really tell what was behind the TaskQueue::EventTargetWrapper in the first place; other than preserving the nsIEventTarget::Dispatch's flags.
But that can be easily achieved without the need of a wrapper.
Assignee | ||
Comment 1•7 months ago
|
||
In bug 1602167; work was done to preserve the dispatch flags in the TaskQueue ;
however this would have had no effect as TaskQueue doesn't override the AbstractThread::Dispatch(already_AddRefed<nsIRunnable> event, uint32_t flags) method which will always drop the flags before calling Dispatch(already_AddRefed<nsIRunnable> aRunnable, DispatchReason aReason) [1]
The EventTargetWrapper would have properly preserved the flags, so we can simply move that Dispatch method in the taskqueue instead while we're at it.
Assignee | ||
Updated•7 months ago
|
Assignee | ||
Comment 2•7 months ago
|
||
We also establish the intent of bug 1602167 on the TaskQueue object
Assignee | ||
Comment 3•7 months ago
|
||
When TaskQueue was first conceived; it was only used with AbstractThreads and with tail dispatch.
By default, AbstractThread::Dispatch dropped the flags , as it was dispatching all tasks via the tail dispatcher.
It was an oversight, there's no use-case where we wouldn't want the dispatch flags to be carried forward.
It also simplifies the code and TaskQueue's use.
Depends on D80351
Pushed by jyavenard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ad3e3c470aec P1. Remove EventTargetWrapper class. r=froydnj https://hg.mozilla.org/integration/autoland/rev/d8c9e055d410 P2. Always retain dispatch flags r=froydnj
Comment 5•7 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ad3e3c470aec
https://hg.mozilla.org/mozilla-central/rev/d8c9e055d410
Description
•