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

Unified Diff: Source/bindings/scripts/v8_attributes.py

Issue 1052563002: [bindings] Include V8HiddenValue only if attribute has CachedAttribute or marked keep alive for GC. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_interface.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_attributes.py
diff --git a/Source/bindings/scripts/v8_attributes.py b/Source/bindings/scripts/v8_attributes.py
index e13f4286604f8839e41f9d52d0fa28f5e0f880f2..01188b6e4627709156b2dfad0cd5400e2ff9dd9d 100644
--- a/Source/bindings/scripts/v8_attributes.py
+++ b/Source/bindings/scripts/v8_attributes.py
@@ -87,13 +87,18 @@ def attribute_context(interface, attribute):
attribute.name == 'onerror'):
includes.add('bindings/core/v8/V8ErrorHandler.h')
+ cached_attribute_validation_method = extended_attributes.get('CachedAttribute')
+ keep_alive_for_gc = is_keep_alive_for_gc(interface, attribute)
+ if cached_attribute_validation_method or keep_alive_for_gc:
+ includes.add('bindings/core/v8/V8HiddenValue.h')
+
context = {
'access_control_list': access_control_list(interface, attribute),
'activity_logging_world_list_for_getter': v8_utilities.activity_logging_world_list(attribute, 'Getter'), # [ActivityLogging]
'activity_logging_world_list_for_setter': v8_utilities.activity_logging_world_list(attribute, 'Setter'), # [ActivityLogging]
'activity_logging_world_check': v8_utilities.activity_logging_world_check(attribute), # [ActivityLogging]
'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True),
- 'cached_attribute_validation_method': extended_attributes.get('CachedAttribute'),
+ 'cached_attribute_validation_method': cached_attribute_validation_method,
'conditional_string': v8_utilities.conditional_string(attribute),
'constructor_type': idl_type.constructor_type_name
if is_constructor_attribute(attribute) else None,
@@ -120,7 +125,7 @@ def attribute_context(interface, attribute):
'is_implemented_in_private_script': is_implemented_in_private_script,
'is_initialized_by_event_constructor':
'InitializedByEventConstructor' in extended_attributes,
- 'is_keep_alive_for_gc': is_keep_alive_for_gc(interface, attribute),
+ 'is_keep_alive_for_gc': keep_alive_for_gc,
'is_nullable': idl_type.is_nullable,
'is_explicit_nullable': idl_type.is_explicit_nullable,
'is_partial_interface_member':
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_interface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698