Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp

Issue 2142173003: binding: Adds layout tests to check origins of window.postMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/dom/resources/EventListener-incumbent-global-subsubframe.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
index 730dd279d54f78797565f1c0ed8ca18ecb84ec9e..4725c465cadedac1acd56151d22cfb18d2c251b2 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
@@ -173,6 +173,10 @@ void V8Window::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::Value>
// None of these need to be RefPtr because info and context are guaranteed
// to hold on to them.
DOMWindow* window = V8Window::toImpl(info.Holder());
+ // TODO(yukishiino): The HTML spec specifies that we should use the
+ // Incumbent Realm instead of the Current Realm, but currently we don't have
+ // a way to retrieve the Incumbent Realm. See also:
+ // https://html.spec.whatwg.org/multipage/comms.html#dom-window-postmessage
LocalDOMWindow* source = currentDOMWindow(info.GetIsolate());
ASSERT(window);
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/dom/resources/EventListener-incumbent-global-subsubframe.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698