Closed Bug 1648159 Opened 1 year ago Closed 1 year ago

Avoid unnecessary redirection of promises.

Categories

(Core :: Audio/Video: MediaStreamGraph, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: achronop, Assigned: achronop)

Details

Attachments

(1 file)

At the end of HTMLMediaElement::SetSrcMediaStreamSink a redirection of MozPromises from GenericPromise::AllPromiseType to GenericPromise is taking place. However, this is not necessary since this is an internal method and the returned value of the promise is not useful. Thus the GenericPromise::AllPromiseType can be returned directly and avoid the extra thread dispatch.

At the end of HTMLMediaElement::SetSrcMediaStreamSink a redirection of MozPromises, from GenericPromise::AllPromiseType to GenericPromise is taking place. However, this is not necessary since this is an internal method and the returned value of the promise is not useful. Thus the GenericPromise::AllPromiseType can be returned directly and avoid the extra thread dispatch.

Pushed by achronopoulos@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e99d26b81d3a
Remove unnecessary redirection of promises when sink changes. r=jya
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.