Closed Bug 1542342 Opened 5 years ago Closed 5 years ago

SpecialPowers.executeSoon should dispatch to the end of the task queue

Categories

(Core :: XPConnect, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox68 --- affected

People

(Reporter: whawkins, Assigned: whawkins)

References

Details

Attachments

(1 obsolete file)

In order to use executeSoon to put off execution of a function until all previous entries in the queue are executed, executeSoon should enqueue the task at the end of the queue (using NS_DISPATCH_AT_END).

Blocks: 1525051

I don't follow. Changing event ordering for executeSoon is likely to break tons of stuff, and also, NS_DISPATCH_AT_END does not change event ordering [1].

[1] https://searchfox.org/mozilla-central/rev/8e0ea968308dd692ba5394b14e584234acf7d4ca/xpcom/threads/nsIEventTarget.idl#43

This is just for SpecialPowers and I did not mean to imply that I wanted to change the semantics of the other definitions of executeSoon.

That said, I just read the comment you referenced and I think that I see your point. That said, I have tested before/after and this fixes the necessary intermittent timing failures that I was seeing.

If you don't mind, let me submit a patch and see what you think? Can I add you as a reviewer in phab?

Thank you for your quick response. I hope that this isn't a waste of your time.

Flags: needinfo?(bobbyholley)

Discussed on a call.

Flags: needinfo?(bobbyholley)

Marking as invalid. Turns out this change is not necessary. Sorry for the confusion!

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
Attachment #9056200 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: