зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1624266 - Use IsSharedMemoryAllowed to decide whether should the CTOR SharedArrayBuffer be defined for Worklets; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D71536
This commit is contained in:
Родитель
15a7628e26
Коммит
684a5d3947
|
@ -2225,8 +2225,6 @@ nsresult nsGlobalWindowOuter::SetNewDocument(Document* aDocument,
|
|||
// (because COOP/COEP support isn't enabled, or because COOP/COEP don't
|
||||
// act to isolate this page to a separate process).
|
||||
|
||||
// XXX worklet will be updated in the follow up patches.
|
||||
|
||||
// Every script context we are initialized with must create a
|
||||
// new global.
|
||||
rv = CreateNativeGlobalForInner(
|
||||
|
|
|
@ -45,12 +45,9 @@ bool AudioWorkletGlobalScope::WrapGlobalObject(
|
|||
// The SharedArrayBuffer global constructor property should not be present in
|
||||
// a fresh global object when shared memory objects aren't allowed (because
|
||||
// COOP/COEP support isn't enabled, or because COOP/COEP don't act to isolate
|
||||
// this worklet to a separate process). However, it's not presently clear how
|
||||
// to do this, so for now assign a backwards-compatible value. Bug 1630877
|
||||
// will fix this.
|
||||
bool defineSharedArrayBufferConstructor = true;
|
||||
// this worklet to a separate process).
|
||||
options.creationOptions().setDefineSharedArrayBufferConstructor(
|
||||
defineSharedArrayBufferConstructor);
|
||||
IsSharedMemoryAllowed());
|
||||
|
||||
JS::AutoHoldPrincipals principals(aCx, new WorkletPrincipals(mImpl));
|
||||
return AudioWorkletGlobalScope_Binding::Wrap(
|
||||
|
|
|
@ -26,12 +26,9 @@ bool PaintWorkletGlobalScope::WrapGlobalObject(
|
|||
// The SharedArrayBuffer global constructor property should not be present in
|
||||
// a fresh global object when shared memory objects aren't allowed (because
|
||||
// COOP/COEP support isn't enabled, or because COOP/COEP don't act to isolate
|
||||
// this worker to a separate process). However, it's not presently clear how
|
||||
// to do this, so for now assign a backwards-compatible value. Bug 1630876
|
||||
// will fix this.
|
||||
bool defineSharedArrayBufferConstructor = true;
|
||||
// this worker to a separate process).
|
||||
options.creationOptions().setDefineSharedArrayBufferConstructor(
|
||||
defineSharedArrayBufferConstructor);
|
||||
IsSharedMemoryAllowed());
|
||||
|
||||
JS::AutoHoldPrincipals principals(aCx, new WorkletPrincipals(mImpl));
|
||||
return PaintWorkletGlobalScope_Binding::Wrap(
|
||||
|
|
Загрузка…
Ссылка в новой задаче