Closed Bug 1362944 Opened 7 years ago Closed 7 years ago

Label runnables in dom/file/MutableBlobStorage.cpp

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: bevis, Assigned: bevis)

References

Details

(Whiteboard: [QDL][TDC-MVP][DOM])

Attachments

(2 files)

1. MutableBlobStorage is a main-thread-only class and is used by
   - Fetch indirectly using MutableBlobStreamListener (http://searchfox.org/mozilla-central/rev/8b70b0a5038ef9472fe7c53e04a70c978bb06aed/dom/fetch/Fetch.cpp#1285)
   - XMLHttpRequestMainThread (http://searchfox.org/mozilla-central/rev/8b70b0a5038ef9472fe7c53e04a70c978bb06aed/dom/xhr/XMLHttpRequestMainThread.cpp#3767)
2. An optional nsIEventTarget shall be provided into its constructor for labeling runnables on the main thread.
3. main-thread runnables dispatched by MutableBlobStorage are:
     http://searchfox.org/mozilla-central/search?q=DispatchToMainThread%7CAsyncWait%7CTimer%7CAbstractThread%7CProxyRelease%7CReleaseOnMainThread&case=false&regexp=true&path=dom%2Ffile%2FMutableBlobStorage.cpp
Blocks: 1363318
1. Accept nsIEventTarget in the CTOR of MutableBlobStorage/MutableBlobStreamListener.
2. Do ProxyRelease and runnable dispatching via this event target.

:baku, may I have your review for these change?

Thanks!
Attachment #8866233 - Flags: review?(amarchesini)
There are 2 call sites to create MutableBlobStorage:
1. XMLHttpRequestMainThread: http://searchfox.org/mozilla-central/rev/7057a51c5cf29b5b115b1db19ace2cfe3fd83a0e/dom/xhr/XMLHttpRequestMainThread.cpp#3767
2. Fetch via MutableBlobStorageListener: http://searchfox.org/mozilla-central/rev/224cc663d54085994a4871ef464b7662e0721e83/dom/fetch/Fetch.cpp#1285

This patch will focus on call site#1.
Call site#2 will be addressed later in bug 1363318 instead.

:baku, May I have your review for these change?

Thanks!
Attachment #8866234 - Flags: review?(amarchesini)
Attachment #8866233 - Flags: review?(amarchesini) → review+
Attachment #8866234 - Flags: review?(amarchesini) → review+
Pushed by btseng@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e447a0ae5dba
Part 1: Accept nsIEventTarget in the CTOR of MutableBlobStorage to support runnable labeling. r=baku
https://hg.mozilla.org/integration/mozilla-inbound/rev/ce4b4af56db5
Part 2: Set proper event target to MutableBlobStorage when created from XMLHttpRequestMainThread. r=baku
Whiteboard: [QDL][TDC-MVP][DOM]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: