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

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

Issue 140903003: Making readonly fields on interfaces be readonly (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 | « sdk/lib/svg/dart2js/svg_dart2js.dart ('k') | no next file » | 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 ab790a134c5f1664394be87e781490fda53bfcc7..a8cc579da04fa960f28c3b2f8ea603ce8b63d1f6 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -804,7 +804,7 @@ class Dart2JSBackend(HtmlDartGenerator):
return
if IsPureInterface(self._interface.id):
- self._AddInterfaceAttribute(attribute, html_name)
+ self._AddInterfaceAttribute(attribute, html_name, read_only)
return
# If the attribute is shadowing, we can't generate a shadowing
@@ -870,10 +870,11 @@ class Dart2JSBackend(HtmlDartGenerator):
if not read_only:
self._AddRenamingSetter(attribute, html_name)
- def _AddInterfaceAttribute(self, attribute, html_name):
+ def _AddInterfaceAttribute(self, attribute, html_name, read_only):
self._members_emitter.Emit(
- '\n $TYPE $NAME;'
+ '\n $QUALIFIER$TYPE $NAME;'
'\n',
+ QUALIFIER='final ' if read_only else '',
NAME=html_name,
TYPE=self.SecureOutputType(attribute.type.id))
« no previous file with comments | « sdk/lib/svg/dart2js/svg_dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698