Open Bug 1347437 Opened 7 years ago Updated 2 years ago

Promises should be run when JS stack is exhausted

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

Tracking Status
firefox55 --- affected

People

(Reporter: jwwang, Unassigned)

References

Details

Attachments

(1 file)

      No description provided.
repro steps:
1. apply the patch
2. build
3. ./mach run dom/media/test/test_events.html

expected event sequence:
got preloadedmetadata event.
Promise resolved.
got loadedmetadata event.

actual event sequence:
got preloadedmetadata event.
got loadedmetadata event.
Promise resolved.

Micro tasks should be run between |r1->Run()| and |r2->Run()|.
Flags: needinfo?(bugs)
The .cpp code is very odd.
Microtasks should not run between those runs, _if_ there are no event listener which get called.
If event listeners are called
, then microtasks are called when outermost script execution ends, so usually at the end of each event listener.
Our Promises don't use microtasks. I'm still fixing that.

I guess this bug is about Promises, not microtasks.
Flags: needinfo?(bugs)
Summary: Micro tasks should be run when JS stack is exhausted → Promises should be run when JS stack is exhausted
Priority: -- → P3
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: