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

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

Issue 21555003: Exposing native doubles as doubles when they are read-only or method return values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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/htmldartgenerator.py ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/systemhtml.py
diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py
index fbb0ee950f1e3abffb380a2a23cd23c2fa3dae4e..48d3694c768a7ea2c17cb89b0d7e953da7acd9c8 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -750,7 +750,7 @@ class Dart2JSBackend(HtmlDartGenerator):
' return $INDEXED_GETTER;\n'
' }',
INDEXED_GETTER=indexed_getter,
- TYPE=self.SecureOutputType(element_type))
+ TYPE=self.SecureOutputType(element_type, False, True))
if 'CustomIndexedSetter' in self._interface.ext_attrs:
self._members_emitter.Emit(
@@ -795,7 +795,7 @@ class Dart2JSBackend(HtmlDartGenerator):
' // final $TYPE $NAME;\n',
SUPER=super_attribute_interface,
NAME=html_name,
- TYPE=self.SecureOutputType(attribute.type.id))
+ TYPE=self.SecureOutputType(attribute.type.id, False, read_only))
return
self._members_emitter.Emit('\n // Shadowing definition.')
self._AddAttributeUsingProperties(attribute, html_name, read_only)
@@ -808,7 +808,7 @@ class Dart2JSBackend(HtmlDartGenerator):
self._AddAttributeUsingProperties(attribute, html_name, read_only)
return
- output_type = self.SecureOutputType(attribute.type.id)
+ output_type = self.SecureOutputType(attribute.type.id, False, read_only)
input_type = self._NarrowInputType(attribute.type.id)
metadata = self._Metadata(attribute.type.id, attribute.id, output_type)
rename = self._RenamingAnnotation(attribute.id, html_name)
@@ -938,7 +938,7 @@ class Dart2JSBackend(HtmlDartGenerator):
METADATA=self._Metadata(info.type_name, info.declared_name,
self.SecureOutputType(info.type_name)),
MODIFIERS='static ' if info.IsStatic() else '',
- TYPE=self.SecureOutputType(info.type_name),
+ TYPE=self.SecureOutputType(info.type_name, False, True),
NAME=html_name,
PARAMS=info.ParametersDeclaration(self._NarrowInputType))
@@ -1043,7 +1043,7 @@ class Dart2JSBackend(HtmlDartGenerator):
self._members_emitter.Emit(
'\n'
' $TYPE $NAME($PARAMS);\n',
- TYPE=self.SecureOutputType(info.type_name),
+ TYPE=self.SecureOutputType(info.type_name, False, True),
NAME=info.name,
PARAMS=info.ParametersDeclaration(self._NarrowInputType))
@@ -1141,9 +1141,6 @@ class Dart2JSBackend(HtmlDartGenerator):
return FindInParent(self._interface) if attr else (None, None)
- def _DartType(self, type_name):
- return self._type_registry.DartType(type_name)
-
# ------------------------------------------------------------------------------
class DartLibraryEmitter():
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698