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

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

Issue 605083004: Merge 38 changes to bleeding edge (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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/src/dart2js_KeyEvent.dart » ('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 54b3ce340bde4e10a2795f01335f4fe3d9a9204b..458c26b61d090f23940a5de7bc123056459a9c15 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -677,6 +677,14 @@ class DartiumBackend(HtmlDartGenerator):
'$!METHODS'
'}\n',
INTERFACE_NAME=DeriveBlinkClassName(self._interface.id))
+ # TODO(vsm): Should we check for collisions between EventConstructors and others?
+ # Should we unify at some point?
+ if 'EventConstructor' in self._interface.ext_attrs:
+ self._native_class_emitter.Emit(
+ '\n'
+ ' static constructorCallback(type, options) native "$(INTERFACE_NAME)_constructorCallback";\n',
+ INTERFACE_NAME=self._interface.id
+ )
self._blink_entries = set()
def _EmitConstructorInfrastructure(self,
@@ -761,7 +769,7 @@ class DartiumBackend(HtmlDartGenerator):
return True
def IsConstructorArgumentOptional(self, argument):
- return False
+ return IsOptional(argument)
def EmitStaticFactoryOverload(self, constructor_info, name, arguments):
constructor_callback_cpp_name = name + 'constructorCallback'
@@ -1339,10 +1347,8 @@ class DartiumBackend(HtmlDartGenerator):
needs_custom_element_callbacks = False
# TODO(antonm): unify with ScriptState below.
- requires_stack_info = (ext_attrs.get('CallWith') == 'ScriptArguments|ScriptState' or
- ext_attrs.get('ConstructorCallWith') == 'ScriptArguments|ScriptState' or
- ext_attrs.get('CallWith') == 'ScriptArguments&ScriptState' or
- ext_attrs.get('ConstructorCallWith') == 'ScriptArguments&ScriptState')
+ call_with = ext_attrs.get('CallWith', '') + ext_attrs.get('ConstructorCallWith', '')
+ requires_stack_info = 'ScriptArguments' in call_with or 'ScriptState' in call_with
if requires_stack_info:
raises_exceptions = True
cpp_arguments = ['&state', 'scriptArguments.release()']
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | tools/dom/src/dart2js_KeyEvent.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698