mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1641874 - Make the pref unchangeable at runtime; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D78282
This commit is contained in:
parent
6f5b781a29
commit
492794a250
@ -1022,7 +1022,8 @@ RefPtr<SessionStorageManager> BrowsingContext::GetSessionStorageManager() {
|
||||
bool BrowsingContext::CrossOriginIsolated() {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
return StaticPrefs::dom_postMessage_sharedArrayBuffer_withCOOP_COEP() &&
|
||||
return StaticPrefs::
|
||||
dom_postMessage_sharedArrayBuffer_withCOOP_COEP_AtStartup() &&
|
||||
Top()->GetOpenerPolicy() ==
|
||||
nsILoadInfo::
|
||||
OPENER_POLICY_SAME_ORIGIN_EMBEDDER_POLICY_REQUIRE_CORP &&
|
||||
|
@ -8079,7 +8079,8 @@ void Document::SetDomain(const nsAString& aDomain, ErrorResult& rv) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (StaticPrefs::dom_postMessage_sharedArrayBuffer_withCOOP_COEP() &&
|
||||
if (StaticPrefs::
|
||||
dom_postMessage_sharedArrayBuffer_withCOOP_COEP_AtStartup() &&
|
||||
GetBrowsingContext() && GetBrowsingContext()->CrossOriginIsolated()) {
|
||||
WarnOnceAbout(Document::eDocumentSetDomainNotAllowed);
|
||||
return;
|
||||
|
@ -5244,7 +5244,8 @@ bool WorkerPrivate::IsSharedMemoryAllowed() const {
|
||||
}
|
||||
|
||||
bool WorkerPrivate::CrossOriginIsolated() const {
|
||||
if (!StaticPrefs::dom_postMessage_sharedArrayBuffer_withCOOP_COEP()) {
|
||||
if (!StaticPrefs::
|
||||
dom_postMessage_sharedArrayBuffer_withCOOP_COEP_AtStartup()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2227,13 +2227,13 @@
|
||||
# re-SAB: Whether to allow postMessage of a SharedArrayBuffer if various
|
||||
# preconditions related to COOP and COEP are met
|
||||
- name: dom.postMessage.sharedArrayBuffer.withCOOP_COEP
|
||||
type: RelaxedAtomicBool
|
||||
type: bool
|
||||
#if !defined(ANDROID)
|
||||
value: @IS_NIGHTLY_BUILD@
|
||||
#else
|
||||
value: false # Blocked by DocumentChannel, see Bug 1589982.
|
||||
#endif
|
||||
mirror: always
|
||||
mirror: once
|
||||
|
||||
# Overridden in all.js on RELEASE_OR_BETA in order to add the locked attribute.
|
||||
- name: dom.postMessage.sharedArrayBuffer.bypassCOOP_COEP.insecure.enabled
|
||||
|
Loading…
Reference in New Issue
Block a user