mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1428447 Set a loading principal on ServiceWorker WorkerPrivate objects. r=asuth
This commit is contained in:
parent
6c6df154cd
commit
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);
|
||||
|
Loading…
Reference in New Issue
Block a user