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