Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit ca9c141

Browse files
Marina Sakaichromium-wpt-export-bot
authored andcommitted
Stop using private properties for data properties of cross-origin properties
Since Blink properly supports the incumbent realm now, there is no more need to use OriginSafeMethodSetter, which sets value via V8PrivateProperty. So there is no need to use V8PrivateProperty also in OriginSafeMethodGetter. This CL makes it possible to handle "data properties" of cross-origin properties as the proper data properties. Bug: 715418 Change-Id: I336a8459b80bc63d08a248f3ed7a34dc0806e5ab Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1844520 Commit-Queue: Marina Sakai <[email protected]> Reviewed-by: Yuki Shiino <[email protected]> Reviewed-by: Hitoshi Yoshida <[email protected]> Cr-Commit-Position: refs/heads/master@{#706304}
1 parent 0e1bcae commit ca9c141

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

html/browsers/origin/cross-origin-objects/cross-origin-objects.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@
148148
assert_throws("SecurityError", function() { win.location.pathname; }, "location.pathname throws cross-origin");
149149
assert_equals(B.frames, 'override', "Overrides visible in the same-origin case");
150150
assert_equals(win.frames, win, "Overrides invisible in the cross-origin case");
151+
assert_equals(B.focus, 'override', "Overrides visible in the same-origin case");
152+
checkFunction(win.focus, Function.prototype);
153+
assert_not_equals(win.focus, focus, "Overrides invisible in the cross-origin case");
151154
}, "Basic sanity-checking");
152155

153156
/*

html/browsers/origin/cross-origin-objects/frame.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
document.domain = document.domain;
77
}
88

9-
// Override the |frames| property to test that such overrides are
9+
// Override the |frames| and |focus| property to test that such overrides are
1010
// properly ignored cross-origin.
1111
window.frames = "override";
12+
window.focus = "override";
1213

1314
// Also add a |then| property to test that it doesn't get exposed.
1415
window.then = "something";

0 commit comments

Comments
 (0)