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

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

Issue 23064024: Attempt to land Dartium roll a second time. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/htmlrenamer.py ('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 27a12b406bd5a20e1acf7ba6ad2f272a211b0415..9a6436ed42c46926225e2ea3892b8b4ffdfe43fa 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -93,6 +93,12 @@ def _GetCPPPartialNames(interface):
else:
return set([])
+def array_type(data_type):
+ matched = re.match(r'([\w\d_\s]+)\[\]', data_type)
+ if not matched:
+ return None
+ return matched.group(1)
+
def _GetCPPTypeName(interface_name, callback_name, cpp_name):
# TODO(vsm): We need to track the original IDL file name in order to recover
# the proper CPP name.
@@ -714,6 +720,9 @@ class DartiumBackend(HtmlDartGenerator):
requires_script_execution_context = (ext_attrs.get('CallWith') == 'ScriptExecutionContext' or
ext_attrs.get('ConstructorCallWith') == 'ScriptExecutionContext')
+
+ requires_document = ext_attrs.get('ConstructorCallWith') == 'Document'
+
if requires_script_execution_context:
raises_exceptions = True
cpp_arguments = ['context']
@@ -725,7 +734,7 @@ class DartiumBackend(HtmlDartGenerator):
cpp_arguments = ['&state']
requires_dom_window = 'NamedConstructor' in ext_attrs
- if requires_dom_window:
+ if requires_dom_window or requires_document:
raises_exceptions = True
cpp_arguments = ['document']
@@ -810,7 +819,7 @@ class DartiumBackend(HtmlDartGenerator):
' }\n'
' ScriptState& state = *currentState;\n\n')
- if requires_dom_window:
+ if requires_dom_window or requires_document:
self._cpp_impl_includes.add('"DOMWindow.h"')
body_emitter.Emit(
' DOMWindow* domWindow = DartUtilities::domWindowForCurrentIsolate();\n'
« no previous file with comments | « tools/dom/scripts/htmlrenamer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698