DOMMediaStream::CountUnderlyingStreams, resolve a Promise while in stable state.

RESOLVED FIXED in Firefox 66

Status

()

defect
P2
normal
Rank:
15
RESOLVED FIXED
7 months ago
7 months ago

People

(Reporter: jya, Assigned: pehrsons)

Tracking

(Blocks 1 bug)

unspecified
mozilla66
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox66 fixed)

Details

Attachments

(2 attachments)

Seen in https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=216630207&repo=try&lineNumber=2731

with test: dom/media/tests/mochitest/test_getUserMedia_GC_MediaStream.html

Underlying issue:
A task is dispatched to the stable state queue.
MediaStreamGraph dispatch all its tasks via nsContentUtils::RunInStableState, including the one from to count
DOMMediaStream::CountUnderlyingStreams

It seems however that DispatchToMainThreadAfterStreamStateUpdate called from 

https://searchfox.org/mozilla-central/rev/3160ddc1f0ab55d230c595366662c62950e5c785/dom/media/DOMMediaStream.cpp#354

Will not re-queue the runnable on the main thread as the name indicate, but instead re-add it to the MSG event queue which will then run that task while in stable state.

At the very least, if it works as intended, DispatchToMainThreadAfterStreamStateUpdate need to be renamed
Assignee: nobody → apehrson
Status: NEW → ASSIGNED
Rank: 15
Priority: -- → P2
Attachment #9031116 - Attachment description: Bug 1513638 - Rename DispatchToMainThreadAfterStreamStateUpdate to DispatchToMainThreadStableState. r?padenot!, r?jya! → Bug 1513638 - Rename DispatchToMainThreadAfterStreamStateUpdate to DispatchToMainThreadStableState. r?karlt!, r?jya!
Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/83732aea5232
Don't resolve DOMMediaStream::CountUnderlyingStreams promise in stable state. r=jya
https://hg.mozilla.org/integration/autoland/rev/feb06b1ef9dd
Rename DispatchToMainThreadAfterStreamStateUpdate to DispatchToMainThreadStableState. r=jya,karlt
https://hg.mozilla.org/mozilla-central/rev/83732aea5232
https://hg.mozilla.org/mozilla-central/rev/feb06b1ef9dd
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.