зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1428447 Set a loading principal on ServiceWorker WorkerPrivate objects. r=asuth
This commit is contained in:
Родитель
6c6df154cd
Коммит
64ef60ebaa
|
@ -1883,6 +1883,7 @@ ServiceWorkerPrivate::SpawnWorkerIfNeeded(WakeUpReason aWhy,
|
|||
if (NS_WARN_IF(!info.mPrincipal)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
info.mLoadingPrincipal = info.mPrincipal;
|
||||
|
||||
nsContentUtils::StorageAccess access =
|
||||
nsContentUtils::StorageAllowedForPrincipal(info.mPrincipal);
|
||||
|
|
|
@ -5040,8 +5040,7 @@ WorkerPrivate::OverrideLoadInfoLoadGroup(WorkerLoadInfo& aLoadInfo,
|
|||
nsIPrincipal* aPrincipal)
|
||||
{
|
||||
MOZ_ASSERT(!aLoadInfo.mInterfaceRequestor);
|
||||
MOZ_ASSERT(aLoadInfo.mPrincipal == aPrincipal /* service workers */ ||
|
||||
aLoadInfo.mLoadingPrincipal == aPrincipal /* any other worker type */);
|
||||
MOZ_ASSERT(aLoadInfo.mLoadingPrincipal == aPrincipal);
|
||||
|
||||
aLoadInfo.mInterfaceRequestor =
|
||||
new WorkerLoadInfo::InterfaceRequestor(aPrincipal, aLoadInfo.mLoadGroup);
|
||||
|
|
Загрузка…
Ссылка в новой задаче