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

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

Issue 1090313002: 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..13c67dc908553e38f781204b0bb372efc362b138 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');
@@ -494,15 +494,31 @@ var convert;
});
let _FusedConverter = _FusedConverter$();
let HTML_ESCAPE = new HtmlEscape();
+ let escapeLtGt$ = Symbol('escapeLtGt');
+ let escapeQuot$ = Symbol('escapeQuot');
+ let escapeApos$ = Symbol('escapeApos');
+ let escapeSlash$ = Symbol('escapeSlash');
let _ = Symbol('_');
let _name = Symbol('_name');
class HtmlEscapeMode extends core.Object {
+ get escapeLtGt() {
+ return this[escapeLtGt$];
+ }
+ get escapeQuot() {
+ return this[escapeQuot$];
+ }
+ get escapeApos() {
+ return this[escapeApos$];
+ }
+ get escapeSlash() {
+ return this[escapeSlash$];
+ }
[_](name, escapeLtGt, escapeQuot, escapeApos, escapeSlash) {
this[_name] = name;
- this.escapeLtGt = escapeLtGt;
- this.escapeQuot = escapeQuot;
- this.escapeApos = escapeApos;
- this.escapeSlash = escapeSlash;
+ this[escapeLtGt$] = escapeLtGt;
+ this[escapeQuot$] = escapeQuot;
+ this[escapeApos$] = escapeApos;
+ this[escapeSlash$] = escapeSlash;
}
toString() {
return this[_name];
@@ -512,12 +528,16 @@ var convert;
HtmlEscapeMode.UNKNOWN = new HtmlEscapeMode[_]('unknown', true, true, true, true);
HtmlEscapeMode.ATTRIBUTE = new HtmlEscapeMode[_]('attribute', false, true, false, false);
HtmlEscapeMode.ELEMENT = new HtmlEscapeMode[_]('element', true, false, false, true);
+ let mode$ = Symbol('mode');
let _convert = Symbol('_convert');
class HtmlEscape extends Converter$(core.String, core.String) {
+ get mode() {
+ return this[mode$];
+ }
HtmlEscape(mode) {
if (mode === void 0)
mode = HtmlEscapeMode.UNKNOWN;
- this.mode = mode;
+ this[mode$] = mode;
super.Converter();
}
convert(text) {
@@ -609,11 +629,19 @@ var convert;
return this[_sink].close();
}
}
+ let unsupportedObject$ = Symbol('unsupportedObject');
+ let cause$ = Symbol('cause');
class JsonUnsupportedObjectError extends core.Error {
+ get unsupportedObject() {
+ return this[unsupportedObject$];
+ }
+ get cause() {
+ return this[cause$];
+ }
JsonUnsupportedObjectError(unsupportedObject, opts) {
let cause = opts && 'cause' in opts ? opts.cause : null;
- this.unsupportedObject = unsupportedObject;
- this.cause = cause;
+ this[unsupportedObject$] = unsupportedObject;
+ this[cause$] = cause;
super.Error();
}
toString() {
@@ -676,19 +704,23 @@ var convert;
}
}
dart.defineNamedConstructor(JsonCodec, 'withReviver');
+ let indent$ = Symbol('indent');
let _utf8Encode = Symbol('_utf8Encode');
class JsonEncoder extends Converter$(core.Object, core.String) {
+ get indent() {
+ return this[indent$];
+ }
JsonEncoder(toEncodable) {
if (toEncodable === void 0)
toEncodable = null;
- this.indent = null;
+ this[indent$] = null;
this[_toEncodable$] = toEncodable;
super.Converter();
}
withIndent(indent, toEncodable) {
if (toEncodable === void 0)
toEncodable = null;
- this.indent = indent;
+ 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