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

Unified Diff: lib/runtime/dart/convert.js

Issue 1093143004: fixes #52, fields shadowing getters/setters or other fields (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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 | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/convert.js
diff --git a/lib/runtime/dart/convert.js b/lib/runtime/dart/convert.js
index 2447a47b7a79b8c30e3184b1293ba96d382e4493..e512334390949d2fee3b1355905cfc5cc71ef7cf 100644
--- a/lib/runtime/dart/convert.js
+++ b/lib/runtime/dart/convert.js
@@ -334,8 +334,8 @@ var convert;
return this[_sink].close();
}
}
- let _buffer = Symbol('_buffer');
let _INITIAL_BUFFER_SIZE = Symbol('_INITIAL_BUFFER_SIZE');
+ let _buffer = Symbol('_buffer');
let _callback = Symbol('_callback');
let _bufferIndex = Symbol('_bufferIndex');
let _roundToPowerOf2 = Symbol('_roundToPowerOf2');
@@ -498,11 +498,11 @@ var convert;
let _name = Symbol('_name');
class HtmlEscapeMode extends core.Object {
[_](name, escapeLtGt, escapeQuot, escapeApos, escapeSlash) {
- this[_name] = name;
- this.escapeLtGt = escapeLtGt;
- this.escapeQuot = escapeQuot;
- this.escapeApos = escapeApos;
- this.escapeSlash = escapeSlash;
+ dart.initField(HtmlEscapeMode, this, _name, name);
+ dart.initField(HtmlEscapeMode, this, 'escapeLtGt', escapeLtGt);
+ dart.initField(HtmlEscapeMode, this, 'escapeQuot', escapeQuot);
+ dart.initField(HtmlEscapeMode, this, 'escapeApos', escapeApos);
+ dart.initField(HtmlEscapeMode, this, 'escapeSlash', escapeSlash);
}
toString() {
return this[_name];
@@ -517,7 +517,7 @@ var convert;
HtmlEscape(mode) {
if (mode === void 0)
mode = HtmlEscapeMode.UNKNOWN;
- this.mode = mode;
+ dart.initField(HtmlEscape, this, 'mode', mode);
super.Converter();
}
convert(text) {
@@ -612,8 +612,8 @@ var convert;
class JsonUnsupportedObjectError extends core.Error {
JsonUnsupportedObjectError(unsupportedObject, opts) {
let cause = opts && 'cause' in opts ? opts.cause : null;
- this.unsupportedObject = unsupportedObject;
- this.cause = cause;
+ dart.initField(JsonUnsupportedObjectError, this, 'unsupportedObject', unsupportedObject);
+ dart.initField(JsonUnsupportedObjectError, this, 'cause', cause);
super.Error();
}
toString() {
@@ -681,14 +681,14 @@ var convert;
JsonEncoder(toEncodable) {
if (toEncodable === void 0)
toEncodable = null;
- this.indent = null;
+ dart.initField(JsonEncoder, this, 'indent', null);
this[_toEncodable$] = toEncodable;
super.Converter();
}
withIndent(indent, toEncodable) {
if (toEncodable === void 0)
toEncodable = null;
- this.indent = indent;
+ dart.initField(JsonEncoder, this, 'indent', indent);
this[_toEncodable$] = toEncodable;
super.Converter();
}
« no previous file with comments | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698