Closed Bug 1364297 Opened 7 years ago Closed 7 years ago

Add name option to workers

Categories

(Core :: DOM: Workers, enhancement, P3)

55 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: d, Assigned: baku)

References

Details

(Keywords: dev-doc-complete)

Attachments

(2 files)

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.
Ben, looks this is a nice but not super critical enhancement. Let me know if we want to get it prioritized.
Priority: -- → P3
Assignee: nobody → amarchesini
Attached patch option.patchSplinter Review
Attachment #8868475 - Flags: review?(bugs)
I'd prefer storing the string as normal nsString, not nsCString, unless there is some good reason to use nsCString.
Attachment #8868475 - Flags: review?(bugs)
I had to split ServiceWorkerScope from WorkerName. This makes sense, btw.
Attachment #8868532 - Flags: review?(bugs)
Attachment #8868475 - Flags: review?(bugs) → review+
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
https://hg.mozilla.org/mozilla-central/rev/df81d9654736
https://hg.mozilla.org/mozilla-central/rev/d52a1c7cf0a3
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Depends on: 1375457
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: