Closed Bug 1492014 Opened 7 years ago Closed 7 years ago

introduce WorkletImpl as an object to identify a worklet from parent and execution threads

Categories

(Core :: DOM: Core & HTML, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: karlt, Assigned: karlt)

References

Details

Attachments

(13 files)

46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
46 bytes, text/x-phabricator-request
baku
: review+
Details | Review
When more than one worklet executes on the same worklet thread, each worklet has its own global. It is useful to have an object to represent the worklet and link its associated objects on parent and execution threads. Currently, WorkletThread is the nearest thing to such an object, but this does not support multiple worklets executing on the same thread. WorkletLoadInfo can move from Worklet and WorkletThread to the new object, which is a good point to subclass for AudioWorklet-specific storage and behavior. Separating this object from the parent-thread Worklet object provides a useful notification when no owner-document references remain, and makes multi-thread ownership simpler.
We'll need to support multiple worklets sharng a single execution thread for AudioWorklet. Depends on D6103
WebIDL bindings do not need this method because console is a namespace. All methods are static. Depends on D6104
This will be useful for AudioWorklet-specific storage and behavior. PaintWorkletImpl is in layout/style, because it will be referenced from CSS.cpp in the same directory. Depends on D6108
Comment on attachment 9009817 [details] Bug 1492014 add AudioWorkletImpl/PaintWorkletImpl subclasses r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9009817 - Flags: review+
Comment on attachment 9009816 [details] Bug 1492014 remove now-unused WorkletThread::mWorkletLoadInfo r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9009816 - Flags: review+
Comment on attachment 9009815 [details] Bug 1492014 get WorkletLoadInfo from global instead of thread in Console r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9009815 - Flags: review+
Comment on attachment 9009814 [details] Bug 1492014 store global as nsIGlobalObject on Console so that this may be used for Worklets also r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9009814 - Flags: review+
Comment on attachment 9009813 [details] Bug 1492014 remove unused Console::GetParentObject() r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9009813 - Flags: review+
Comment on attachment 9009812 [details] Bug 1492014 get WorkletLoadInfo from global rather than thread in WorkletGlobalScope r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9009812 - Flags: review+
Comment on attachment 9009811 [details] Bug 1492014 reference WorkletImpl from WorkletGlobalScope r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9009811 - Flags: review+
Comment on attachment 9009810 [details] Bug 1492014 document WorkletLoadInfo thread safety and relax destructor thread assertion r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9009810 - Flags: review+
Comment on attachment 9009809 [details] Bug 1492014 introduce WorkletImpl as an object to identify a worklet from parent and execution threads r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9009809 - Flags: review+
Comment on attachment 9009808 [details] Bug 1492014 remove unused aWorkletLoadInfo parameter to ExecutionRunnable() r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9009808 - Flags: review+
Comment on attachment 9009807 [details] Bug 1492014 remove declaration for non-existant WorkletThread::GetWorkerPrincipal() r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9009807 - Flags: review+
Comment on attachment 9010604 [details] Bug 1492014 replace WorkletLoadInfo::mDumpEnabled with StaticPrefs r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9010604 - Flags: review+
Comment on attachment 9010603 [details] Bug 1492014 test Console::mInnerID instead of mGlobal when needing a window id r?baku Andrea Marchesini [:baku] has approved the revision.
Attachment #9010603 - Flags: review+
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d77330a1cbfa remove declaration for non-existant WorkletThread::GetWorkerPrincipal() r=baku https://hg.mozilla.org/integration/autoland/rev/b0f2fafdba8c remove unused aWorkletLoadInfo parameter to ExecutionRunnable() r=baku https://hg.mozilla.org/integration/autoland/rev/3e142ea44140 introduce WorkletImpl as an object to identify a worklet from parent and execution threads r=baku https://hg.mozilla.org/integration/autoland/rev/e34938a11fab document WorkletLoadInfo thread safety and relax destructor thread assertion r=baku https://hg.mozilla.org/integration/autoland/rev/4d1ba44e30ab reference WorkletImpl from WorkletGlobalScope r=baku https://hg.mozilla.org/integration/autoland/rev/ac095c2fdd8b get WorkletLoadInfo from global rather than thread in WorkletGlobalScope r=baku https://hg.mozilla.org/integration/autoland/rev/5a3967f37d3f remove unused Console::GetParentObject() r=baku https://hg.mozilla.org/integration/autoland/rev/d1654231ffb8 store global as nsIGlobalObject on Console so that this may be used for Worklets also r=baku https://hg.mozilla.org/integration/autoland/rev/0c6b469c9618 get WorkletLoadInfo from global instead of thread in Console r=baku https://hg.mozilla.org/integration/autoland/rev/8818f5ae0d13 remove now-unused WorkletThread::mWorkletLoadInfo r=baku https://hg.mozilla.org/integration/autoland/rev/2798792623cf add AudioWorkletImpl/PaintWorkletImpl subclasses r=baku https://hg.mozilla.org/integration/autoland/rev/0a8510efbba3 test Console::mInnerID instead of mGlobal when needing a window id r=baku https://hg.mozilla.org/integration/autoland/rev/f629b66a235f replace WorkletLoadInfo::mDumpEnabled with StaticPrefs r=baku
Backout by nbeleuzu@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/d03b538b6b41 Backed out 13 changesets for multiple failures. a=backout
Narcis, can you please link to the failures in question? Also, bugs backed out from m-c need to be reopened.
Status: RESOLVED → REOPENED
Flags: needinfo?(nbeleuzu)
Resolution: FIXED → ---
Target Milestone: mozilla64 → ---
There were also Mochitests crashes on [@ mozilla::dom::Console::Console(JSContext*, nsIGlobalObject*, unsigned long, unsigned long)] Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=201397994&repo=mozilla-central&lineNumber=164462
Depends on: 1494799
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/dc2b839f4e68 remove declaration for non-existant WorkletThread::GetWorkerPrincipal() r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/c6bb9f8bbaa3 remove unused aWorkletLoadInfo parameter to ExecutionRunnable() r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/8bfd0578ebaf introduce WorkletImpl as an object to identify a worklet from parent and execution threads r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/19c7245a11e0 document WorkletLoadInfo thread safety and relax destructor thread assertion r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/7576b6eca5d1 reference WorkletImpl from WorkletGlobalScope r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/bb62e7dad63f get WorkletLoadInfo from global rather than thread in WorkletGlobalScope r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/4d3a8fe2d2c7 remove unused Console::GetParentObject() r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/270ae583f0ef store global as nsIGlobalObject on Console so that this may be used for Worklets also r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/d952654b9cc2 get WorkletLoadInfo from global instead of thread in Console r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/66eb950c3f82 remove now-unused WorkletThread::mWorkletLoadInfo r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/e545854fd235 add AudioWorkletImpl/PaintWorkletImpl subclasses r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/cb3fa704e175 test Console::mInnerID instead of mGlobal when needing a window id r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/17f44e6e8f49 replace WorkletLoadInfo::mDumpEnabled with StaticPrefs r=baku
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: