mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Bug 1503072 - Correct ServiceWorker host-based cleanup. r=dom-worker-reviewers,edenchuang a=pascalc
ServiceWorkerCleanUp's host based cleaning has not correctly been checking whether the provided host is a root domain of the ServiceWorker registration, instead performing an exact match (which is what removeFromPrincipal does). This check makes the logic consistent with other deleteByHost implementations and is actually using the same check logic. Differential Revision: https://phabricator.services.mozilla.com/D111992
This commit is contained in:
parent
2d3c621c79
commit
b7f57d1b77
@ -58,7 +58,9 @@ function unregisterServiceWorkersMatching(filterFn) {
|
||||
|
||||
this.ServiceWorkerCleanUp = {
|
||||
removeFromHost(aHost) {
|
||||
return unregisterServiceWorkersMatching(sw => sw.principal.host == aHost);
|
||||
return unregisterServiceWorkersMatching(sw =>
|
||||
Services.eTLD.hasRootDomain(sw.principal.host, aHost)
|
||||
);
|
||||
},
|
||||
|
||||
removeFromBaseDomain(aBaseDomain) {
|
||||
|
Loading…
Reference in New Issue
Block a user