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

Unified Diff: Source/bindings/scripts/unstable/v8_interface.py

Issue 61523003: IDL compiler: [CheckSecurity=Frame] interfaces (initial) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
Index: Source/bindings/scripts/unstable/v8_interface.py
diff --git a/Source/bindings/scripts/unstable/v8_interface.py b/Source/bindings/scripts/unstable/v8_interface.py
index ed300d4208cde18ecbdfac47122d261cf19b8bdb..8e27e3fa67023345b150f94dd15f0963a57d52cf 100644
--- a/Source/bindings/scripts/unstable/v8_interface.py
+++ b/Source/bindings/scripts/unstable/v8_interface.py
@@ -67,11 +67,18 @@ def generate_interface(interface):
extended_attributes = interface.extended_attributes
v8_class_name = v8_utilities.v8_class_name(interface)
+ is_check_security = 'CheckSecurity' in extended_attributes
+ if is_check_security:
+ includes.update(['bindings/v8/BindingSecurity.h',
+ 'bindings/v8/ExceptionMessages.h',
+ 'bindings/v8/ExceptionState.h'])
+
template_contents = {
'cpp_class_name': cpp_name(interface),
'header_includes': INTERFACE_H_INCLUDES,
'interface_name': interface.name,
'is_active_dom_object': 'ActiveDOMObject' in extended_attributes,
+ 'is_check_security': is_check_security,
'v8_class_name': v8_class_name,
}
@@ -96,6 +103,12 @@ def generate_interface(interface):
template_contents.update({
'has_per_context_enabled_methods': any(method['per_context_enabled_function_name'] for method in methods),
'methods': methods,
+ 'standard_methods':
Nils Barth (inactive) 2013/11/19 06:56:06 Moved from templates to here b/c need to do an ove
haraken 2013/11/19 07:05:06 standard_methods => has_standard_method ? BTW, wo
Nils Barth (inactive) 2013/11/19 08:10:09 Rearranged to compute a value for each method, so
haraken 2013/11/19 08:52:47 It's OK in this CL, but the core issue is we have
haraken 2013/11/19 08:58:05 Supporting indexed/named properties will also add
Nils Barth (inactive) 2013/11/20 06:36:23 The full check is in v8_methods.py: 'do_not_check_
Nils Barth (inactive) 2013/11/20 06:36:23 Got it; let's do it then!
+ [method for method in methods if
+ method['do_not_check_signature'] and
+ not method['per_context_enabled_function_name'] and
+ # For overloaded methods, only generate one accessor
+ ('overload_index' not in method or method['overload_index'] == 1)],
})
return template_contents

Powered by Google App Engine
This is Rietveld 408576698