diff options
author | Moonchild <moonchild@palemoon.org> | 2021-08-15 11:45:53 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-08-15 11:45:53 +0000 |
commit | a5a14974a1c47e9359927e2c80926f689f7bf9c6 (patch) | |
tree | 8cf24927ca044ba2c278fe540ef096186a62b40b /dom/workers/WorkerPrivate.cpp | |
parent | 9baa17379ea6281bb47c66b7932d80e8d3362406 (diff) | |
download | uxp-a5a14974a1c47e9359927e2c80926f689f7bf9c6.tar.gz |
Issue #1797 - Implement WindowOrWorkerGlobalScope.origin
Resolves #1797
Diffstat (limited to 'dom/workers/WorkerPrivate.cpp')
-rw-r--r-- | dom/workers/WorkerPrivate.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 5edf7dc4a5..1d9459cd07 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -1759,6 +1759,7 @@ WorkerLoadInfo::StealFrom(WorkerLoadInfo& aOther) mPrincipalInfo = aOther.mPrincipalInfo.forget(); mDomain = aOther.mDomain; + mOrigin = aOther.mOrigin; mServiceWorkerCacheName = aOther.mServiceWorkerCacheName; mWindowID = aOther.mWindowID; mServiceWorkerID = aOther.mServiceWorkerID; @@ -3623,6 +3624,8 @@ WorkerPrivateParent<Derived>::SetPrincipal(nsIPrincipal* aPrincipal, mLoadInfo.mPrincipalInfo = new PrincipalInfo(); mLoadInfo.mOriginAttributes = nsContentUtils::GetOriginAttributes(aLoadGroup); + nsContentUtils::GetUTFOrigin(aPrincipal, mLoadInfo.mOrigin); + MOZ_ALWAYS_SUCCEEDS( PrincipalToPrincipalInfo(aPrincipal, mLoadInfo.mPrincipalInfo)); } |