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

Unified Diff: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl

Issue 2668753006: Special-case LocalDOMWindow for same-origin access in bindings. (Closed)
Patch Set: Just special case DOMWindow Created 3 years, 11 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
Index: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
index 43137dc9d98225944e18cfdd1fce805d56ffb8ed..a3a12a2d21a8e86b74aeb0eb6e3dd6bb6caf2d50 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
@@ -29,8 +29,12 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
return;
}
{% endif %}
+ {% if interface_name == 'Window' and not method.is_cross_origin %}
+ LocalDOMWindow* impl = toLocalDOMWindow({{v8_class}}::toImpl(info.Holder()));
+ {% else %}
{{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder());
{% endif %}
+ {% endif %}
{# Security checks #}
{% if method.is_check_security_for_receiver %}

Powered by Google App Engine
This is Rietveld 408576698