Closed
Bug 1343308
Opened 8 years ago
Closed 8 years ago
Clients.matchAll() should only return Clients controlled by current ServiceWorker instance
Categories
(Core :: DOM: Service Workers, defect)
Core
DOM: Service Workers
Tracking
()
RESOLVED
FIXED
mozilla54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: bkelly, Assigned: bkelly)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
(deleted),
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
It appears that we've never fully implemented step 2.2.3.1 of:
https://w3c.github.io/ServiceWorker/#clients-getall
We should not only be checking the registration, but verifying the Client is controlled by the exact ServiceWorker instance calling `clients.matchAll()`.
Assignee | ||
Updated•8 years ago
|
Assignee | ||
Comment 1•8 years ago
|
||
I'm going to fix this before bug 1293277 in order to make sure the new implementation passes this test.
Blocks: 1293277
Assignee | ||
Comment 2•8 years ago
|
||
By default Clients.matchAll() is supposed to return Client objects controlled by the ServiceWorker calling the API. Our code, however, returns any Client controlled by the current registration. This patch makes us match the spec by passing the current ServiceWorker's ID through to ServiceWorkerManager::GetAllClients().
Attachment #8842158 -
Flags: review?(amarchesini)
Assignee | ||
Comment 3•8 years ago
|
||
This adds a test for the exact controller behavior in Clients.matchAll(). Basically it sets up an active worker that controls two frames and a waiting worker on the same registration. It then verifies that the waiting worker sees nothing and the active worker sees its controllees.
We fail this test on current mozilla-central and pass it with the P1 patch.
Attachment #8842159 -
Flags: review?(amarchesini)
Assignee | ||
Comment 4•8 years ago
|
||
These patches depend on the code in bug 1266747 landing first.
Depends on: 1266747
Updated•8 years ago
|
Attachment #8842158 -
Flags: review?(amarchesini) → review+
Updated•8 years ago
|
Attachment #8842159 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 5•8 years ago
|
||
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a34bdb0c31a
P1 Make Clients.matchAll() only return Clients controlled by the current service worker. r=baku
https://hg.mozilla.org/integration/mozilla-inbound/rev/b8a79ad3b03e
P2 Add a WPT test verifying Clients.matchAll() only returns Clients controlled by calling worker. r=baku
Comment 7•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1a34bdb0c31a
https://hg.mozilla.org/mozilla-central/rev/b8a79ad3b03e
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in
before you can comment on or make changes to this bug.
Description
•