use pattern matching when listening clear-origin-data in ServiceWorkerManager

RESOLVED FIXED in Firefox 46

Status

()

Core
DOM: Workers
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: allstars, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
mozilla46
Points:
---

Firefox Tracking Flags

(firefox46 fixed)

Details

Attachments

(1 attachment, 4 obsolete attachments)

See Honza's comment in https://bugzilla.mozilla.org/show_bug.cgi?id=1233136#c0

"ServiceWorkerManager [2], bug 1191647, that doesn't build OriginAttributesPattern from aData"
Created attachment 8699940 [details] [diff] [review]
WIP Patch

WIP, still have problems on writing tests.
Created attachment 8700559 [details] [diff] [review]
Patch.

Thanks to :kanru's help, I get the tests running. :D
Attachment #8699940 - Attachment is obsolete: true
Created attachment 8700931 [details] [diff] [review]
Patch

fixed some try failure
Attachment #8700559 - Attachment is obsolete: true
Created attachment 8700932 [details] [diff] [review]
Patch.
Attachment #8700931 - Attachment is obsolete: true
Comment on attachment 8700932 [details] [diff] [review]
Patch.

Review of attachment 8700932 [details] [diff] [review]:
-----------------------------------------------------------------

Hi Ben
The handling of clear-origin-data landed in Bug 1191647 has some problems,
for example, when the data is {appId: 1} in clear-origin-data,
we should clear all registrations for appId = 1, whether the inBrowser flag is true or not.
Right now the code will only clear the registration {appId: 1, inBrowser: false}

Also test is included, 
in the test I need a mozbrowser frame which needs 'browser' permission,
to prevent adding more permissions into the original app,
so I create another test app, which is copied the test app from dom/workers/test/serviceworkers/app/

Could you review this for me?

Thanks
Attachment #8700932 - Flags: review?(bkelly)

Comment 8

2 years ago
Comment on attachment 8700932 [details] [diff] [review]
Patch.

Review of attachment 8700932 [details] [diff] [review]:
-----------------------------------------------------------------

Sorry, I'm buried trying to get a beta crasher fixed before going on holiday.  Andrea, can you take this review?

::: dom/workers/test/serviceworkers/app3/sw.js
@@ +1,1 @@
> +// Useless service worker.

Please use: dom/workers/test/serviceworkers/empty.js
Attachment #8700932 - Flags: review?(bkelly) → review?(amarchesini)
Attachment #8700932 - Flags: review?(amarchesini) → review+
Created attachment 8704550 [details] [diff] [review]
Patch. v2

use empty.js
Attachment #8700932 - Attachment is obsolete: true
Attachment #8704550 - Flags: review+

Comment 12

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/b53aa421ca19
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox46: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.