Commit 7a29a1fc authored by arthursonzogni's avatar arthursonzogni Committed by Commit Bot

[COOP] Access reporting [10/N] Detect setting opener.

Patch [3/N] modified blink windows's binding to call CheckCoopAccess()
whenever a "CrossOrigin" attribute/methods was accessed.

So far, so good. Nevertheless, some attributes are missing, because they
have a custom implementation. CheckCoopAccess needs to be added manually
for them. This patch fixes the accesses when setting "opener".

COOP access reporting:
[ 1/N] https://chromium-review.googlesource.com/c/chromium/src/+/2264294
[ 2/N] https://chromium-review.googlesource.com/c/chromium/src/+/2270185
[ 3/N] https://chromium-review.googlesource.com/c/chromium/src/+/2270472
[ 4/N] https://chromium-review.googlesource.com/c/chromium/src/+/2273120
[ 5/N] https://chromium-review.googlesource.com/c/chromium/src/+/2309433
[ 6/N] https://chromium-review.googlesource.com/c/chromium/src/+/2308715
[ 7/N] https://chromium-review.googlesource.com/c/chromium/src/+/2309697
[ 8/N] https://chromium-review.googlesource.com/c/chromium/src/+/2275889
[ 9/N] https://chromium-review.googlesource.com/c/chromium/src/+/2310530
[10/N] this patch.

Bug: 1090273
Change-Id: I4a5357d123db9e04ac4ac4fcf119ac3cacd93688
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315024Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791883}
parent 4aa810b2
...@@ -143,6 +143,7 @@ static void OpenerAttributeSet(v8::Local<v8::Value> value, ...@@ -143,6 +143,7 @@ static void OpenerAttributeSet(v8::Local<v8::Value> value,
const CallbackInfo& info) { const CallbackInfo& info) {
v8::Isolate* isolate = info.GetIsolate(); v8::Isolate* isolate = info.GetIsolate();
DOMWindow* impl = V8Window::ToImpl(info.Holder()); DOMWindow* impl = V8Window::ToImpl(info.Holder());
impl->ReportCoopAccess(isolate, "opener");
if (!impl->GetFrame()) if (!impl->GetFrame())
return; return;
......
...@@ -31,7 +31,7 @@ PASS same-site > w => w.location = "#" ...@@ -31,7 +31,7 @@ PASS same-site > w => w.location = "#"
FAIL same-site > w => w["test"] assert_not_equals: Report not received got disallowed value "timeout" FAIL same-site > w => w["test"] assert_not_equals: Report not received got disallowed value "timeout"
FAIL same-site > w => w["test"] = "" assert_not_equals: Report not received got disallowed value "timeout" FAIL same-site > w => w["test"] = "" assert_not_equals: Report not received got disallowed value "timeout"
PASS same-site > w => w.opener PASS same-site > w => w.opener
FAIL same-site > w => w.opener = "" assert_not_equals: Report not received got disallowed value "timeout" PASS same-site > w => w.opener = ""
FAIL same-site > w => w.postMessage("") assert_not_equals: Report not received got disallowed value "timeout" FAIL same-site > w => w.postMessage("") assert_not_equals: Report not received got disallowed value "timeout"
FAIL same-site > w => w.postMessage("", "") assert_not_equals: Report not received got disallowed value "timeout" FAIL same-site > w => w.postMessage("", "") assert_not_equals: Report not received got disallowed value "timeout"
PASS same-site > w => w.self PASS same-site > w => w.self
......
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