Bug 1227015 P3 Require a script spec on install jobs. r=ehsan
☠☠ backed out by dc33b155d02c ☠ ☠
authorBen Kelly <ben@wanderview.com>
Tue, 08 Dec 2015 11:58:45 -0500
changeset 310045 4bef51e9c8aeb18d873cb80e43fb60f0c4503cec
parent 310044 c46b5abddec57854d2ead617e78d78045bd0d44c
child 310046 7fb0c56916d2daffe7a7827e5c976fec1fb9620e
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1227015
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1227015 P3 Require a script spec on install jobs. r=ehsan
dom/workers/ServiceWorkerManager.cpp
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -1048,20 +1048,21 @@ protected:
 class ServiceWorkerInstallJob final : public ServiceWorkerScriptJobBase
 {
   friend class ContinueInstallTask;
 
 public:
   ServiceWorkerInstallJob(ServiceWorkerJobQueue* aQueue,
                           ServiceWorkerUpdateFinishCallback* aCallback,
                           ServiceWorkerRegistrationInfo* aRegistration,
-                          ServiceWorkerInfo* aServiceWorkerInfo)
+                          ServiceWorkerInfo* aServiceWorkerInfo,
+                          const nsACString& aScriptSpec)
     : ServiceWorkerScriptJobBase(aQueue, Type::InstallJob, aCallback,
                                  aRegistration, aServiceWorkerInfo,
-                                 EmptyCString())
+                                 aScriptSpec)
   {
     MOZ_ASSERT(aRegistration);
   }
 
   void
   Start()
   {
     AssertIsOnMainThread();
@@ -1388,18 +1389,18 @@ private:
 
       NS_ConvertUTF8toUTF16 scriptSpec(mRegistration->mScriptSpec);
       NS_ConvertUTF8toUTF16 scope(mRegistration->mScope);
       error.ThrowTypeError<MSG_SW_SCRIPT_THREW>(scriptSpec, scope);
       return Fail(error);
     }
 
     RefPtr<ServiceWorkerInstallJob> job =
-      new ServiceWorkerInstallJob(mQueue, mCallback,
-                                  mRegistration, mUpdateAndInstallInfo);
+      new ServiceWorkerInstallJob(mQueue, mCallback, mRegistration,
+                                  mUpdateAndInstallInfo, mScriptSpec);
     mQueue->Append(job);
     Done(NS_OK);
   }
 
   void
   Update()
   {
     AssertIsOnMainThread();