Bug 1578623 use an opaque origin for WorkletGlobalScope r=baku

The environment settings object for a WorkletGlobalScope derives from the
relevant settings object of the main-thread Worklet object, but the origin is
a unique opaque origin.
https://drafts.css-houdini.org/worklets/#set-up-a-worklet-environment-settings-object

Depends on D44775

Differential Revision: https://phabricator.services.mozilla.com/D44776

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Karl Tomlinson 2019-09-06 02:10:33 +00:00
Родитель 40e181a9ae
Коммит e9f3cabd45
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -10,6 +10,7 @@
#include "WorkletThread.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/NullPrincipal.h"
#include "mozilla/dom/RegisterWorkletBindings.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/WorkletBinding.h"
@ -35,7 +36,7 @@ WorkletLoadInfo::WorkletLoadInfo(nsPIDOMWindowInner* aWindow)
WorkletImpl::WorkletImpl(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal)
: mOriginAttributes(BasePrincipal::Cast(aPrincipal)->OriginAttributesRef()),
mPrincipal(aPrincipal),
mPrincipal(NullPrincipal::CreateWithInheritedAttributes(aPrincipal)),
mWorkletLoadInfo(aWindow),
mTerminated(false) {}