Closed Bug 1513638 Opened 2 years ago Closed 2 years ago

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

Categories

(Core :: Audio/Video: MediaStreamGraph, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: jya, Assigned: pehrsons)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

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: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.