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

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

Issue 1807843002: [Binding] Include RuntimeEnabledFeature.h if a dictionary has a RuntimeEnabledFeature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/scripts/v8_dictionary.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py b/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py
index dde7e1ce6ae3ebc43eb9d3c9506c7df6f5dc133a..a6abb3134d69318c575c83f729ecdaa42e0b8256 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_dictionary.py
@@ -53,13 +53,21 @@ def unwrap_nullable_if_needed(idl_type):
def dictionary_context(dictionary, interfaces_info):
includes.clear()
includes.update(DICTIONARY_CPP_INCLUDES)
+
+ members = [member_context(dictionary, member)
+ for member in sorted(dictionary.members,
+ key=operator.attrgetter('name'))]
+
+ for member in members:
bashi 2016/03/16 07:18:07 nit: you can also write this like: if any(member[
+ if member['runtime_enabled_function']:
+ includes.add('platform/RuntimeEnabledFeatures.h')
+ break
+
cpp_class = v8_utilities.cpp_name(dictionary)
context = {
'cpp_class': cpp_class,
'header_includes': set(DICTIONARY_H_INCLUDES),
- 'members': [member_context(dictionary, member)
- for member in sorted(dictionary.members,
- key=operator.attrgetter('name'))],
+ 'members': members,
'required_member_names': sorted([member.name
for member in dictionary.members
if member.is_required]),
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698