don't drop dispatch flags in TaskQueue's EventTargetWrapper
Categories
(Core :: XPCOM, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: froydnj, Assigned: froydnj)
References
Details
Attachments
(1 file)
![]() |
Assignee | |
Comment 1•6 years ago
|
||
TaskQueue
wraps an nsIEventTarget
to provide "one runnable at a
time" execution policies regardless of the underlying implementation of
the wrapped nsIEventTarget
(e.g. a thread pool). TaskQueue
also
provides a nsISerialEventTarget
wrapper, EventTargetWrapper
, around
itself (!) for consumers who want to continue to provide a more
XPCOM-ish API.
One would think that dispatching tasks to EventTargetWrapper
with a
given set of flags would pass that set of flags through, unchanged, to
the underlying event target of the wrapped TaskQueue
.
This pass-through is not the case. TaskQueue
supports a "tail
dispatch" mode of operation that is undocumented anywhere in the tree.
Roughly, tail dispatch to a TaskQueue
says (with several other conditions)
that dispatched tasks are held separately and not passed through to the
underlying event target. All tasks dispatched to a given TaskQueue
are subject to tail dispatch, and therefore, the current implementation
simply drops any passed flags on the floor.
These flags, however, might be meaningful, and we should attempt to
honor them in the cases we're not doing tail dispatch. (And when we are
doing tail dispatch, we can verify that the requested flags are not
asking for peculiar things.)
Comment 3•6 years ago
|
||
bugherder |
Description
•