Closed Bug 1418917 Opened 7 years ago Closed 7 years ago

Run more MediaCacheStream functions off the main thread

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(2 files)

      No description provided.
Assignee: nobody → jwwang
Blocks: 1369263
Priority: -- → P3
Attachment #8931578 - Flags: review?(bechen)
Attachment #8931579 - Flags: review?(bechen)
Comment on attachment 8931578 [details]
Bug 1418917. P1 - run some functions off the main thread.

https://reviewboard.mozilla.org/r/202708/#review208030
Attachment #8931578 - Flags: review?(bechen) → review+
Comment on attachment 8931579 [details]
Bug 1418917. P2 - NotifyClientSuspended() should check mClosed.

https://reviewboard.mozilla.org/r/202710/#review208032
Attachment #8931579 - Flags: review?(bechen) → review+
Attachment #8931578 - Flags: review?(gsquelart)
Attachment #8931579 - Flags: review?(gsquelart)
Comment on attachment 8931578 [details]
Bug 1418917. P1 - run some functions off the main thread.

https://reviewboard.mozilla.org/r/202708/#review208046

::: dom/media/MediaCache.cpp:1941
(Diff revision 1)
> +  RefPtr<ChannelMediaResource> client = mClient;
> +  nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction(
> +    "MediaCacheStream::NotifyLoadID", [client, this, aLoadID]() {

Now that we have C++14, you could remove the external 'client' definition, and directly initialize the captured 'client': `[client = RefPtr<CMR>(mClient), ...`.

Same with other instances below.
Attachment #8931578 - Flags: review?(gsquelart) → review+
Comment on attachment 8931579 [details]
Bug 1418917. P2 - NotifyClientSuspended() should check mClosed.

https://reviewboard.mozilla.org/r/202710/#review208050
Attachment #8931579 - Flags: review?(gsquelart) → review+
Thanks for the reviews!
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/341c3b6cc245
P1 - run some functions off the main thread. r=bechen,gerald
https://hg.mozilla.org/integration/autoland/rev/d715aa4349b8
P2 - NotifyClientSuspended() should check mClosed. r=bechen,gerald
https://hg.mozilla.org/mozilla-central/rev/341c3b6cc245
https://hg.mozilla.org/mozilla-central/rev/d715aa4349b8
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: