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

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

Issue 2460423002: Use new LazyDataProperty API for DOM constructors (Closed)
Patch Set: updates Created 4 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: third_party/WebKit/Source/bindings/scripts/v8_attributes.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
index d28bb73b68382f9b7faf5127494a391d5881177a..c1a416b76adfd3ec05abbcab91ad3242e823bb72 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
@@ -210,7 +210,7 @@ def filter_has_accessor_configuration(attributes):
attribute['should_be_exposed_to_script']]
-def filter_has_attribute_configuration(attributes):
+def filter_has_data_attribute_configuration(attributes):
return [attribute for attribute in attributes if
not (attribute['exposed_test'] or
attribute['secure_context_test'] or
@@ -220,6 +220,18 @@ def filter_has_attribute_configuration(attributes):
attribute['should_be_exposed_to_script']]
+def is_lazy_data_attribute(attribute):
+ return attribute['constructor_type'] and not attribute['needs_constructor_getter_callback']
+
+
+def filter_has_attribute_configuration(attributes):
+ return [attribute for attribute in filter_has_data_attribute_configuration(attributes) if not is_lazy_data_attribute(attribute)]
+
+
+def filter_has_lazy_data_attribute_configuration(attributes):
+ return [attribute for attribute in filter_has_data_attribute_configuration(attributes) if is_lazy_data_attribute(attribute)]
+
+
def filter_origin_trial_enabled(attributes):
return [attribute for attribute in attributes if
attribute['origin_trial_feature_name'] and
@@ -236,6 +248,7 @@ def filter_purely_runtime_enabled(attributes):
def attribute_filters():
return {'has_accessor_configuration': filter_has_accessor_configuration,
'has_attribute_configuration': filter_has_attribute_configuration,
+ 'has_lazy_data_attribute_configuration': filter_has_lazy_data_attribute_configuration,
'origin_trial_enabled_attributes': filter_origin_trial_enabled,
'purely_runtime_enabled_attributes': filter_purely_runtime_enabled}

Powered by Google App Engine
This is Rietveld 408576698