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

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

Issue 24661002: Emitting CustomElementCallbackDispatcher for all APIs impacting custom element lifecycle (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « no previous file | 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 84f1cbc1e1d8de0fc0e2895497bda556222b982f..038825c60331ff7c517d43e90bc72947f67d7cb0 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -737,6 +737,7 @@ class DartiumBackend(HtmlDartGenerator):
cpp_arguments = []
runtime_check = None
raises_exceptions = raises_dom_exception or arguments
+ needs_custom_element_callbacks = False
# TODO(antonm): unify with ScriptState below.
requires_stack_info = (ext_attrs.get('CallWith') == 'ScriptArguments|ScriptState' or
@@ -791,6 +792,10 @@ class DartiumBackend(HtmlDartGenerator):
if return_type_is_nullable:
cpp_arguments = ['isNull']
+ if ext_attrs.get('CustomElementCallbacks') == 'Enable':
+ self._cpp_impl_includes.add('"core/dom/CustomElementCallbackDispatcher.h"')
+ needs_custom_element_callbacks = True
+
v8EnabledPerContext = ext_attrs.get('synthesizedV8EnabledPerContext', ext_attrs.get('V8EnabledPerContext'))
v8EnabledAtRuntime = ext_attrs.get('synthesizedV8EnabledAtRuntime', ext_attrs.get('V8EnabledAtRuntime'))
assert(not (v8EnabledPerContext and v8EnabledAtRuntime))
@@ -910,6 +915,9 @@ class DartiumBackend(HtmlDartGenerator):
' return;\n',
INDEX=len(arguments) + 1)
+ if needs_custom_element_callbacks:
+ body_emitter.Emit(' CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;\n');
+
# Emit arguments.
start_index = 1 if needs_receiver else 0
for i, argument in enumerate(arguments):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698