Commit 1113a437 authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

document.domain setting should be ignored when cross-origin isolated

Bug: 1058309
Change-Id: Icb86941037a48ef476cff0c6c41c11d76423f19f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2417872
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: default avatarDomenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810149}
parent 63694859
......@@ -5928,6 +5928,16 @@ void Document::setDomain(const String& raw_domain,
return;
}
if (RuntimeEnabledFeatures::CrossOriginIsolationEnabled() &&
Agent::IsCrossOriginIsolated()) {
AddConsoleMessage(MakeGarbageCollected<ConsoleMessage>(
mojom::blink::ConsoleMessageSource::kSecurity,
mojom::blink::ConsoleMessageLevel::kWarning,
"document.domain mutation is ignored because the surrounding agent "
"cluster is cross-origin isolated."));
return;
}
if (GetFrame()) {
UseCounter::Count(*this,
dom_window_->GetSecurityOrigin()->Port() == 0
......
This is a testharness.js-based test.
FAIL SharedArrayBuffer and a same-origin-domain (but not same-origin) iframe assert_equals: expected "www1.web-platform.test" but got "web-platform.test"
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment