Bug 1227015 P2 Move mScriptSpec from registration job into script job base. r=ehsan

This commit is contained in:
Ben Kelly 2015-12-08 11:58:45 -05:00
Родитель 48d0ba6249
Коммит 3e15fcaa7d
1 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -968,13 +968,17 @@ protected:
class ServiceWorkerScriptJobBase : public ServiceWorkerJobBase class ServiceWorkerScriptJobBase : public ServiceWorkerJobBase
{ {
protected: protected:
const nsCString mScriptSpec;
ServiceWorkerScriptJobBase(ServiceWorkerJobQueue* aQueue, ServiceWorkerScriptJobBase(ServiceWorkerJobQueue* aQueue,
ServiceWorkerJob::Type aJobType, ServiceWorkerJob::Type aJobType,
ServiceWorkerUpdateFinishCallback* aCallback, ServiceWorkerUpdateFinishCallback* aCallback,
ServiceWorkerRegistrationInfo* aRegistration, ServiceWorkerRegistrationInfo* aRegistration,
ServiceWorkerInfo* aServiceWorkerInfo) ServiceWorkerInfo* aServiceWorkerInfo,
const nsACString& aScriptSpec)
: ServiceWorkerJobBase(aQueue, aJobType, aCallback, aRegistration, : ServiceWorkerJobBase(aQueue, aJobType, aCallback, aRegistration,
aServiceWorkerInfo) aServiceWorkerInfo)
, mScriptSpec(aScriptSpec)
{ {
} }
@ -1051,7 +1055,8 @@ public:
ServiceWorkerRegistrationInfo* aRegistration, ServiceWorkerRegistrationInfo* aRegistration,
ServiceWorkerInfo* aServiceWorkerInfo) ServiceWorkerInfo* aServiceWorkerInfo)
: ServiceWorkerScriptJobBase(aQueue, Type::InstallJob, aCallback, : ServiceWorkerScriptJobBase(aQueue, Type::InstallJob, aCallback,
aRegistration, aServiceWorkerInfo) aRegistration, aServiceWorkerInfo,
EmptyCString())
{ {
MOZ_ASSERT(aRegistration); MOZ_ASSERT(aRegistration);
} }
@ -1182,7 +1187,6 @@ class ServiceWorkerRegisterJob final : public ServiceWorkerScriptJobBase,
friend class ContinueUpdateRunnable; friend class ContinueUpdateRunnable;
nsCString mScope; nsCString mScope;
nsCString mScriptSpec;
nsCOMPtr<nsIPrincipal> mPrincipal; nsCOMPtr<nsIPrincipal> mPrincipal;
nsCOMPtr<nsILoadGroup> mLoadGroup; nsCOMPtr<nsILoadGroup> mLoadGroup;
@ -1200,9 +1204,8 @@ public:
nsIPrincipal* aPrincipal, nsIPrincipal* aPrincipal,
nsILoadGroup* aLoadGroup) nsILoadGroup* aLoadGroup)
: ServiceWorkerScriptJobBase(aQueue, Type::RegisterJob, aCallback, nullptr, : ServiceWorkerScriptJobBase(aQueue, Type::RegisterJob, aCallback, nullptr,
nullptr) nullptr, aScriptSpec)
, mScope(aScope) , mScope(aScope)
, mScriptSpec(aScriptSpec)
, mPrincipal(aPrincipal) , mPrincipal(aPrincipal)
, mLoadGroup(aLoadGroup) , mLoadGroup(aLoadGroup)
{ {
@ -1216,7 +1219,7 @@ public:
ServiceWorkerRegistrationInfo* aRegistration, ServiceWorkerRegistrationInfo* aRegistration,
ServiceWorkerUpdateFinishCallback* aCallback) ServiceWorkerUpdateFinishCallback* aCallback)
: ServiceWorkerScriptJobBase(aQueue, Type::UpdateJob, aCallback, : ServiceWorkerScriptJobBase(aQueue, Type::UpdateJob, aCallback,
aRegistration, nullptr) aRegistration, nullptr, EmptyCString())
{ {
AssertIsOnMainThread(); AssertIsOnMainThread();
} }