Open Bug 1582900 Opened 6 years ago Updated 1 year ago

Bogus-looking comment in ServiceWorkerContainer::Register

Categories

(Core :: DOM: Service Workers, task, P2)

task

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

Details

(Whiteboard: dom-lws-bugdash-triage)

https://searchfox.org/mozilla-central/rev/e18057a9613ffda06dfd3640209ca234ed7dc37d/dom/serviceworkers/ServiceWorkerContainer.cpp#272 says:

// Step 5. Parse against entry settings object's base URL.

but it's not doing that. It's getting a base URL from GetParentObject, which is the relevant settings, not entry settings.

Which is good, because the spec at https://w3c.github.io/ServiceWorker/#navigator-service-worker-register in step 5 says to use the relevant settings. So the code is fine; it's just the comment that's wrong. And caused someone else to write incorrect code today; see https://phabricator.services.mozilla.com/D45457#inline-284160

Priority: -- → P2
Severity: normal → S3
Type: defect → task
Whiteboard: dom-lws-bugdash-triage
You need to log in before you can comment on or make changes to this bug.