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

Side by Side Diff: tools/dom/scripts/dartmetadata.py

Issue 2857143003: dart2js_html: Fix for issue 29538 - some returned lists may be null (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « sdk/lib/svg/dart2js/svg_dart2js.dart ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality to provide Dart metadata for 6 """This module provides shared functionality to provide Dart metadata for
7 DOM APIs. 7 DOM APIs.
8 """ 8 """
9 9
10 import copy 10 import copy
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 'Document.getElementsByName': [ 85 'Document.getElementsByName': [
86 "@Creates('NodeList|HtmlCollection')", 86 "@Creates('NodeList|HtmlCollection')",
87 "@Returns('NodeList|HtmlCollection')", 87 "@Returns('NodeList|HtmlCollection')",
88 ], 88 ],
89 89
90 'Document.getElementsByTagName': [ 90 'Document.getElementsByTagName': [
91 "@Creates('NodeList|HtmlCollection')", 91 "@Creates('NodeList|HtmlCollection')",
92 "@Returns('NodeList|HtmlCollection')", 92 "@Returns('NodeList|HtmlCollection')",
93 ], 93 ],
94 94
95 # querysSelectorAll never returns `null`.
96 'Document.querySelectorAll': [
97 "@Creates('NodeList')",
98 "@Returns('NodeList')",
99 ],
100 'DocumentFragment.querySelectorAll': [
101 "@Creates('NodeList')",
102 "@Returns('NodeList')",
103 ],
104 'Element.querySelectorAll': [
105 "@Creates('NodeList')",
106 "@Returns('NodeList')",
107 ],
108
95 # Methods returning Window can return a local window, or a cross-frame 109 # Methods returning Window can return a local window, or a cross-frame
96 # window (=Object) that needs wrapping. 110 # window (=Object) that needs wrapping.
97 'Window': [ 111 'Window': [
98 "@Creates('Window|=Object')", 112 "@Creates('Window|=Object')",
99 "@Returns('Window|=Object')", 113 "@Returns('Window|=Object')",
100 ], 114 ],
101 115
102 'Window.openDatabase': [ 116 'Window.openDatabase': [
103 "@Creates('SqlDatabase')", 117 "@Creates('SqlDatabase')",
104 ], 118 ],
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 pass 906 pass
893 else: 907 else:
894 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) 908 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id))
895 909
896 return annotations 910 return annotations
897 911
898 def Flush(self): 912 def Flush(self):
899 json_file = open(self._api_status_path, 'w+') 913 json_file = open(self._api_status_path, 'w+')
900 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True) 914 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True)
901 json_file.close() 915 json_file.close()
OLDNEW
« no previous file with comments | « sdk/lib/svg/dart2js/svg_dart2js.dart ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698