Commit 9f3e8190 authored by arthursonzogni's avatar arthursonzogni Committed by Commit Bot
parent f744697b
......@@ -210,6 +210,7 @@ void V8Window::NamedPropertyGetterCustom(
// https://html.spec.whatwg.org/C/#document-tree-child-browsing-context-name-property-set
Frame* child = frame->Tree().ScopedChild(name);
if (child) {
window->ReportCoopAccess(info.GetIsolate(), "named");
UseCounter::Count(CurrentExecutionContext(info.GetIsolate()),
WebFeature::kNamedAccessOnWindow_ChildBrowsingContext);
......@@ -270,6 +271,7 @@ void V8Window::NamedPropertyGetterCustom(
if (!has_named_item && !has_id_item)
return;
window->ReportCoopAccess(info.GetIsolate(), "named");
if (!has_named_item && has_id_item &&
!doc->ContainsMultipleElementsWithId(name)) {
......
This is a testharness.js-based test.
FAIL same-site > w => w["iframeName"] assert_equals: expected 1 but got 0
FAIL cross-origin > w => w["iframeName"] assert_equals: expected 1 but got 0
FAIL same-site > w => w["divID"] assert_equals: expected 1 but got 0
PASS cross-origin > w => w["divID"]
PASS same-site > w => w["existingGlobal"]
PASS cross-origin > w => w["existingGlobal"]
PASS same-site > w => w["missingGlobal"]
PASS cross-origin > w => w["missingGlobal"]
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