From d40ef59cb0bf59a95561a95dc3da4af0d452a097 Mon Sep 17 00:00:00 2001 From: Ben Kelly Date: Tue, 8 Dec 2015 11:58:45 -0500 Subject: [PATCH] Bug 1227015 P4 Make register job always require an explicit script spec. r=ehsan --- dom/workers/ServiceWorkerManager.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index 3c6c4b28ffac..29e2e9fdfecf 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -1218,9 +1218,10 @@ public: // [[Update]] ServiceWorkerRegisterJob(ServiceWorkerJobQueue* aQueue, ServiceWorkerRegistrationInfo* aRegistration, - ServiceWorkerUpdateFinishCallback* aCallback) + ServiceWorkerUpdateFinishCallback* aCallback, + const nsACString& aScriptSpec) : ServiceWorkerScriptJobBase(aQueue, Type::UpdateJob, aCallback, - aRegistration, nullptr, EmptyCString()) + aRegistration, nullptr, aScriptSpec) { AssertIsOnMainThread(); } @@ -3638,7 +3639,8 @@ ServiceWorkerManager::SoftUpdate(const OriginAttributes& aOriginAttributes, MOZ_ASSERT(queue); RefPtr job = - new ServiceWorkerRegisterJob(queue, registration, nullptr); + new ServiceWorkerRegisterJob(queue, registration, nullptr, + newest->ScriptSpec()); queue->Append(job); } } @@ -3692,7 +3694,8 @@ ServiceWorkerManager::Update(nsIPrincipal* aPrincipal, // "Invoke Update algorithm, or its equivalent, with client, registration as // its argument." RefPtr job = - new ServiceWorkerRegisterJob(queue, registration, aCallback); + new ServiceWorkerRegisterJob(queue, registration, aCallback, + newest->ScriptSpec()); queue->Append(job); }