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

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

Issue 291983002: Add explicit resolver string map to dart:html generator (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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/_blink/dartium/_blink_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 3dad5765c515e9f7c0988911d0ebbbe54676ebcf..603ec4b81ade095617310ab569210b5be2188acf 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -13,6 +13,13 @@ from htmldartgenerator import *
from idlnode import IDLArgument, IDLAttribute
from systemhtml import js_support_checks, GetCallbackInfo, HTML_LIBRARY_NAMES
+# This is an ugly hack to get things working on the M35 roll. Once we
+# generate dart:blink from the new scripts, this shouldn't be needed.
+_cpp_resolver_string_map = {
+ 'XMLHttpRequest_constructorCallback_RESOLVER_STRING_0_':
+ 'XMLHttpRequest_constructorCallback_RESOLVER_STRING_1_XMLHttpRequestOptions',
+}
+
# TODO(vsm): This logic needs to pulled from the source IDL. These tables are
# an ugly workaround.
_cpp_callback_map = {
@@ -587,6 +594,9 @@ class DartiumBackend(HtmlDartGenerator):
# First we emit the toplevel function
dart_native_name = \
DeriveNativeName(self._interface.id, constructor_callback_cpp_name, "")
+ if constructor_callback_id in _cpp_resolver_string_map:
+ constructor_callback_id = \
+ _cpp_resolver_string_map[constructor_callback_id]
self._native_library_emitter.Emit(
'\n'
'$FACTORY_METHOD_NAME($PARAMETERS) native "$ID";\n',
@@ -1008,6 +1018,9 @@ class DartiumBackend(HtmlDartGenerator):
resolver_string = \
DeriveResolverString(self._interface.id, "item", "Callback",
["unsigned long"])
+ if resolver_string in _cpp_resolver_string_map:
+ resolver_string = \
+ _cpp_resolver_string_map[resolver_string]
self._native_library_emitter.Emit(
'\n'
'$(DART_NATIVE_NAME)(mthis, index) '
@@ -1649,7 +1662,9 @@ class DartiumBackend(HtmlDartGenerator):
else:
formals = ", ".join(parameters)
actuals = ", ".join(parameters)
-
+ if native_binding in _cpp_resolver_string_map:
+ native_binding = \
+ _cpp_resolver_string_map[native_binding]
self._native_library_emitter.Emit(
'\n'
'$DART_NAME($FORMALS) native "$NATIVE_BINDING";\n',
« no previous file with comments | « sdk/lib/_blink/dartium/_blink_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698