Closed
Bug 1364297
Opened 7 years ago
Closed 7 years ago
Add name option to workers
Categories
(Core :: DOM: Workers, enhancement, P3)
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: d, Assigned: baku)
References
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
14.77 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
22.19 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
We added names to dedicated workers in HTML, mainly for debugging purposes, based on a WebKit request: https://github.com/whatwg/html/commit/3bb652169741d5dd94d7f1b390f6491e38d640cb. This supplements how shared workers already have names. This is also tied up in the WorkerOptions version of the Worker/SharedWorker constructors used for module workers, but it's possible to implement just the name part of WorkerOptions without any module stuff.
Tests:
- http://w3c-test.org/workers/name-property.html
- http://w3c-test.org/workers/shared-worker-name-via-options.html
The actual spec PR was merged a bit prematurely; multiple vendors were on board with the idea, but not everyone got a chance to review the final proposed API shape. So if there are objections please let us know and we can revise the spec or revert it.
Comment 1•7 years ago
|
||
Ben, looks this is a nice but not super critical enhancement. Let me know if we want to get it prioritized.
Priority: -- → P3
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → amarchesini
Assignee | ||
Comment 2•7 years ago
|
||
Attachment #8868475 -
Flags: review?(bugs)
Comment 3•7 years ago
|
||
I'd prefer storing the string as normal nsString, not nsCString, unless there is some good reason to use nsCString.
Updated•7 years ago
|
Attachment #8868475 -
Flags: review?(bugs)
Assignee | ||
Updated•7 years ago
|
Attachment #8868475 -
Flags: review?(bugs)
Assignee | ||
Comment 4•7 years ago
|
||
I had to split ServiceWorkerScope from WorkerName. This makes sense, btw.
Attachment #8868532 -
Flags: review?(bugs)
Updated•7 years ago
|
Attachment #8868475 -
Flags: review?(bugs) → review+
Updated•7 years ago
|
Attachment #8868532 -
Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/df81d9654736
Worker and SharedWorker constructors have an optional WorkerOptions parameter, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/d52a1c7cf0a3
Use nsString instead nsCString for Worker names, r=smaug
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/df81d9654736
https://hg.mozilla.org/mozilla-central/rev/d52a1c7cf0a3
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•7 years ago
|
Keywords: dev-doc-needed
Comment 7•7 years ago
|
||
I've updated all the pages that need to include a mention of the new name properties/options:
https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope
https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/name
https://developer.mozilla.org/en-US/docs/Web/API/SharedWorkerGlobalScope
https://developer.mozilla.org/en-US/docs/Web/API/SharedWorkerGlobalScope/name
https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker
https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker/SharedWorker
https://developer.mozilla.org/en-US/docs/Web/API/Worker
https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker
I've also added a note to the Fx55 rel notes:
https://developer.mozilla.org/en-US/Firefox/Releases/55#DOM_HTML_DOM
Let me know if that's all OK. Cheers!
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•