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

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

Issue 11644103: Adding types to dart:html's dartium files where possible. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review feedback. Created 7 years, 11 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 | « sdk/lib/web_audio/dartium/web_audio_dartium.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/systemnative.py
diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
index ddade576d7f903d6cf46f0ccc3b673b83c5e90a6..4258d8143b1ebc42a4cb7b97786e6daad5c55ab5 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -428,18 +428,16 @@ class DartiumBackend(HtmlDartGenerator):
info: An OperationInfo object.
"""
- operation = info.operations[0]
-
- is_custom = 'Custom' in operation.ext_attrs
- has_optional_arguments = any(self._IsArgumentOptionalInWebCore(operation, argument) for argument in operation.arguments)
- needs_dispatcher = not is_custom and (len(info.operations) > 1 or has_optional_arguments)
-
dart_declaration = '%s%s %s(%s)' % (
'static ' if info.IsStatic() else '',
self.SecureOutputType(info.type_name),
html_name,
- info.ParametersDeclaration(
- (lambda x: 'dynamic') if needs_dispatcher else self._DartType))
+ info.ParametersDeclaration(self._DartType))
+
+ operation = info.operations[0]
+ is_custom = 'Custom' in operation.ext_attrs
+ has_optional_arguments = any(self._IsArgumentOptionalInWebCore(operation, argument) for argument in operation.arguments)
+ needs_dispatcher = not is_custom and (len(info.operations) > 1 or has_optional_arguments)
if not needs_dispatcher:
# Bind directly to native implementation
« no previous file with comments | « sdk/lib/web_audio/dartium/web_audio_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698