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

Unified Diff: tools/dom/scripts/generator.py

Issue 1720743005: Generation of sdk/lib files from 45 roll (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged with TOT Created 4 years, 10 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 | « tools/dom/scripts/generate_blink_file.py ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/generator.py
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index bb26d6ffc4d07f306831403c685e34dae17f5584..5caca40bd46c4693714b729db8c547132560980a 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -294,7 +294,6 @@ def AnalyzeOperation(interface, operations):
Returns: An OperationInfo object.
"""
-
# split operations with optional args into multiple operations
split_operations = []
for operation in operations:
@@ -1466,9 +1465,20 @@ class TypeRegistry(object):
class_name = '%sIDLTypeInfo' % type_data.clazz
return globals()[class_name](type_name, type_data)
+def isList(return_type):
+ return return_type.startswith('List<') if return_type else False
+
+def get_list_type(return_type):
+ # Get the list type NNNN inside of List<NNNN>
+ return return_type[5:-1] if isList(return_type) else return_type
+
def wrap_unwrap_list_blink(return_type, type_registry):
- """Return True if the type is a List<Node>"""
- return return_type.startswith('List<Node>')
+ """Return True if the type is the list type is a blink know
+ type e.g., List<Node>, List<FontFace>, etc."""
+ if isList(return_type):
+ list_type = get_list_type(return_type)
+ if type_registry.HasInterface(list_type):
+ return True;
def wrap_unwrap_type_blink(return_type, type_registry):
"""Returns True if the type is a blink type that requires wrap_jso or
« no previous file with comments | « tools/dom/scripts/generate_blink_file.py ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698