Closed Bug 1593802 Opened 5 years ago Closed 5 years ago

don't drop dispatch flags in TaskQueue's EventTargetWrapper

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

Details

Attachments

(1 file)

No description provided.

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.)

Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f7b96ecb2925
don't drop dispatch flags in TaskQueue's EventTargetWrapper; r=erahm
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: