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

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: 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/scripts/code_generator_v8.pm ('k') | Source/bindings/scripts/unstable/v8_methods.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..746de7a505841da2e8dc3d041c1aabf26e563b92 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,
}
@@ -93,7 +100,15 @@ def generate_interface(interface):
methods = [v8_methods.generate_method(interface, method)
for method in interface.operations]
generate_overloads(methods)
+ for method in methods:
+ method['do_generate_method_configuration'] = (
+ 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))
+
template_contents.update({
+ 'has_method_configuration': any(method['do_generate_method_configuration'] for method in methods),
'has_per_context_enabled_methods': any(method['per_context_enabled_function_name'] for method in methods),
'methods': methods,
})
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/scripts/unstable/v8_methods.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698