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

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

Issue 12217089: Allow non-primitive-value dictionaries to be passed to constructors for html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
Index: tools/dom/scripts/systemhtml.py
diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py
index f960434674d7d21029f23ef0943997db9b670698..bae81fdf8bc0b522e5b726282563d77b8b7dac92 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -70,6 +70,17 @@ _js_custom_members = set([
'WorkerContext.indexedDB',
])
+_js_custom_constructors = set([
+ 'AudioContext',
+ 'Blob',
+ 'MutationObserver',
+ 'Notification',
+ 'RTCIceCandidate',
+ 'RTCPeerConnection',
+ 'RTCSessionDescription',
+ 'SpeechRecognition',
+ ])
+
# Classes that offer only static methods, and therefore we should suppress
# constructor creation.
_static_classes = set(['Url'])
@@ -611,12 +622,7 @@ class Dart2JSBackend(HtmlDartGenerator):
def GenerateCustomFactory(self, constructor_info):
# Custom factory will be taken from the template.
- return self._interface.doc_js_name in [
- 'AudioContext',
- 'Blob',
- 'MutationObserver',
- 'SpeechRecognition',
- ]
+ return self._interface.doc_js_name in _js_custom_constructors
def IsConstructorArgumentOptional(self, argument):
return 'Optional' in argument.ext_attrs

Powered by Google App Engine
This is Rietveld 408576698