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

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

Issue 12543014: Reapply Futureification. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « tools/dom/scripts/systemhtml.py ('k') | tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate » ('j') | 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 06e27a9b5abeed122db7f3b2ece1fd2d358b459d..b997c4141e1595da3090476543bdd6c1b8699870 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -10,7 +10,7 @@ import emitter
import os
from generator import *
from htmldartgenerator import *
-from systemhtml import js_support_checks
+from systemhtml import js_support_checks, GetCallbackInfo
class DartiumBackend(HtmlDartGenerator):
"""Generates Dart implementation for one DOM IDL interface."""
@@ -475,7 +475,9 @@ class DartiumBackend(HtmlDartGenerator):
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:
+ if info.callback_args:
+ self._AddFutureifiedOperation(info, html_name)
+ elif not needs_dispatcher:
# Bind directly to native implementation
argument_count = (0 if info.IsStatic() else 1) + len(info.param_infos)
cpp_callback_name = self._GenerateNativeBinding(
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698