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

Unified Diff: Source/bindings/templates/methods.cpp

Issue 61523003: IDL compiler: [CheckSecurity=Frame] interfaces (initial) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised Created 7 years, 1 month 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 | « Source/bindings/templates/interface_base.cpp ('k') | Tools/Scripts/webkitpy/bindings/main.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/methods.cpp
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
index dff9e18015d330e09aa1a373c74adc63550c4b3b..1d95f3625437db5339c56cb8d94e8458d4523ee5 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -18,9 +18,15 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
{% if method.is_custom_element_callbacks %}
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
{% endif %}
- {% if method.is_raises_exception %}
+ {% if method.is_raises_exception or method.is_check_security_for_frame %}
ExceptionState exceptionState(info.Holder(), info.GetIsolate());
{% endif %}
+ {% if method.is_check_security_for_frame %}
+ if (!BindingSecurity::shouldAllowAccessToFrame(imp->frame(), exceptionState)) {
+ exceptionState.throwIfNeeded();
+ return;
+ }
+ {% endif %}
{% if method.is_check_security_for_node %}
if (!BindingSecurity::shouldAllowAccessToNode(imp->{{method.name}}(exceptionState), exceptionState)) {
v8SetReturnValueNull(info);
« no previous file with comments | « Source/bindings/templates/interface_base.cpp ('k') | Tools/Scripts/webkitpy/bindings/main.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698