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

Side by Side Diff: Source/bindings/scripts/v8_attributes.py

Issue 419163004: Add HandleScopes and ScriptForbiddenScope::AllowUserAgentScript to private scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_methods.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 # [TypeChecking] 69 # [TypeChecking]
70 has_type_checking_unrestricted = ( 70 has_type_checking_unrestricted = (
71 (has_extended_attribute_value(interface, 'TypeChecking', 'Unrestricted') or 71 (has_extended_attribute_value(interface, 'TypeChecking', 'Unrestricted') or
72 has_extended_attribute_value(attribute, 'TypeChecking', 'Unrestricted') ) and 72 has_extended_attribute_value(attribute, 'TypeChecking', 'Unrestricted') ) and
73 idl_type.name in ('Float', 'Double')) 73 idl_type.name in ('Float', 'Double'))
74 # [ImplementedInPrivateScript] 74 # [ImplementedInPrivateScript]
75 is_implemented_in_private_script = 'ImplementedInPrivateScript' in extended_ attributes 75 is_implemented_in_private_script = 'ImplementedInPrivateScript' in extended_ attributes
76 if is_implemented_in_private_script: 76 if is_implemented_in_private_script:
77 includes.add('bindings/core/v8/PrivateScriptRunner.h') 77 includes.add('bindings/core/v8/PrivateScriptRunner.h')
78 includes.add('core/frame/LocalFrame.h') 78 includes.add('core/frame/LocalFrame.h')
79 includes.add('platform/ScriptForbiddenScope.h')
79 80
80 if (base_idl_type == 'EventHandler' and 81 if (base_idl_type == 'EventHandler' and
81 interface.name in ['Window', 'WorkerGlobalScope'] and 82 interface.name in ['Window', 'WorkerGlobalScope'] and
82 attribute.name == 'onerror'): 83 attribute.name == 'onerror'):
83 includes.add('bindings/core/v8/V8ErrorHandler.h') 84 includes.add('bindings/core/v8/V8ErrorHandler.h')
84 85
85 context = { 86 context = {
86 'access_control_list': access_control_list(attribute), 87 'access_control_list': access_control_list(attribute),
87 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_ world_list(attribute, 'Getter'), # [ActivityLogging] 88 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_ world_list(attribute, 'Getter'), # [ActivityLogging]
88 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_ world_list(attribute, 'Setter'), # [ActivityLogging] 89 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_ world_list(attribute, 'Setter'), # [ActivityLogging]
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 lambda self: strip_suffix(self.base_type, 'Constructor')) 478 lambda self: strip_suffix(self.base_type, 'Constructor'))
478 479
479 480
480 def is_constructor_attribute(attribute): 481 def is_constructor_attribute(attribute):
481 # FIXME: replace this with [ConstructorAttribute] extended attribute 482 # FIXME: replace this with [ConstructorAttribute] extended attribute
482 return attribute.idl_type.base_type.endswith('Constructor') 483 return attribute.idl_type.base_type.endswith('Constructor')
483 484
484 485
485 def constructor_getter_context(interface, attribute, context): 486 def constructor_getter_context(interface, attribute, context):
486 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] 487 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as']
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_methods.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698