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

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

Issue 1383903002: wrap_jso should wrap JsArray as well, not always call wrap on its contents (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
Index: tools/dom/scripts/generator.py
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index fe4e03ebe4f265268692475959a75ff022b03528..6f31a7d397e127d594f2c87b51d2656a20a1af2d 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -515,7 +515,7 @@ class OperationInfo(object):
return ', '.join(map(param_name, self.param_infos[:parameter_count]))
def isCallback(self, type_registry, type_id):
- if type_id:
+ if type_id and not type_id.endswith('[]'):
callback_type = type_registry._database._all_interfaces[type_id]
return callback_type.operations[0].id == 'handleEvent' if len(callback_type.operations) > 0 else False
else:
@@ -1446,7 +1446,8 @@ def wrap_unwrap_type_blink(return_type, type_registry):
return_type == 'Future' or
return_type == 'SqlDatabase' or # renamed to Database
return_type == 'HTMLElement' or
- return_type == 'MutationObserver')
+ return_type == 'MutationObserver' or
+ return_type.endswith('[]'))
def wrap_type_blink(return_type, type_registry):
"""Returns True if the type is a blink type that requires wrap_jso but
« no previous file with comments | « tests/html/wrapping_collections_test.dart ('k') | tools/dom/templates/html/dartium/html_dartium.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698