mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1155153 - [e10s] about:serviceworkers should work in e10s mode. Update B2G implementation. r=baku
This commit is contained in:
parent
0628a7464e
commit
400735b9ec
@ -130,7 +130,16 @@ this.AboutServiceWorkers = {
|
||||
self.sendError(message.id, "MissingScope");
|
||||
return;
|
||||
}
|
||||
gServiceWorkerManager.softUpdate(message.scope);
|
||||
|
||||
if (!message.principal ||
|
||||
!message.principal.originAttributes) {
|
||||
// XXX This will always error until bug 1171915 is fixed.
|
||||
self.sendError(message.id, "MissingOriginAttributes");
|
||||
return;
|
||||
}
|
||||
|
||||
gServiceWorkerManager.propagateSoftUpdate({},
|
||||
message.scope);
|
||||
self.sendResult(message.id, true);
|
||||
break;
|
||||
|
||||
@ -166,9 +175,9 @@ this.AboutServiceWorkers = {
|
||||
Ci.nsIServiceWorkerUnregisterCallback
|
||||
])
|
||||
};
|
||||
gServiceWorkerManager.unregister(principal,
|
||||
serviceWorkerUnregisterCallback,
|
||||
message.scope);
|
||||
gServiceWorkerManager.propagateUnregister(principal,
|
||||
serviceWorkerUnregisterCallback,
|
||||
message.scope);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -128,12 +128,15 @@ add_test(function test_swm() {
|
||||
"SWM.getAllRegistrations exists");
|
||||
do_check_true(typeof gServiceWorkerManager.getAllRegistrations == "function",
|
||||
"SWM.getAllRegistrations is a function");
|
||||
do_check_true(gServiceWorkerManager.softUpdate, "SWM.softUpdate exists");
|
||||
do_check_true(typeof gServiceWorkerManager.softUpdate == "function",
|
||||
"SWM.softUpdate is a function");
|
||||
do_check_true(gServiceWorkerManager.unregister, "SWM.unregister exists");
|
||||
do_check_true(typeof gServiceWorkerManager.unregister == "function",
|
||||
"SWM.unregister exists");
|
||||
do_check_true(gServiceWorkerManager.propagateSoftUpdate,
|
||||
"SWM.propagateSoftUpdate exists");
|
||||
do_check_true(typeof gServiceWorkerManager.propagateSoftUpdate == "function",
|
||||
|
||||
"SWM.propagateSoftUpdate is a function");
|
||||
do_check_true(gServiceWorkerManager.propagateUnregister,
|
||||
"SWM.propagateUnregister exists");
|
||||
do_check_true(typeof gServiceWorkerManager.propagateUnregister == "function",
|
||||
"SWM.propagateUnregister exists");
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user