Bug 1049599 - ServiceWorkers should also be canceled when a window goes away. r=bent

This commit is contained in:
Nikhil Marathe
2014-08-23 20:25:08 -07:00
parent d041dfb090
commit a3fb6dffe9

View File

@@ -2205,7 +2205,7 @@ RuntimeService::CancelWorkersForWindow(nsPIDOMWindow* aWindow)
for (uint32_t index = 0; index < workers.Length(); index++) {
WorkerPrivate*& worker = workers[index];
if (worker->IsSharedWorker()) {
if (worker->IsSharedWorker() || worker->IsServiceWorker()) {
worker->CloseSharedWorkersForWindow(aWindow);
} else if (!worker->Cancel(cx)) {
JS_ReportPendingException(cx);