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

Unified Diff: lib/runtime/dart/async.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/_native_typed_data.js ('k') | lib/runtime/dart/collection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/async.js
diff --git a/lib/runtime/dart/async.js b/lib/runtime/dart/async.js
index 1a903cf608c52099f578034ad25c200bb009cedd..d09264f34cb5d13a74b29dc1987b685ad5dd8466 100644
--- a/lib/runtime/dart/async.js
+++ b/lib/runtime/dart/async.js
@@ -20,8 +20,8 @@ var async;
let _getBestStackTrace = Symbol('_getBestStackTrace');
class AsyncError extends core.Object {
AsyncError(error, stackTrace) {
- this.error = error;
- this.stackTrace = stackTrace;
+ dart.initField(AsyncError, this, 'error', error);
+ dart.initField(AsyncError, this, 'stackTrace', stackTrace);
}
toString() {
return this.error.toString();
@@ -850,9 +850,9 @@ var async;
let _recordCancel = Symbol('_recordCancel');
let _recordPause = Symbol('_recordPause');
let _recordResume = Symbol('_recordResume');
+ let _STATE_CANCEL_ON_ERROR = Symbol('_STATE_CANCEL_ON_ERROR');
let _zone = Symbol('_zone');
let _state = Symbol('_state');
- let _STATE_CANCEL_ON_ERROR = Symbol('_STATE_CANCEL_ON_ERROR');
let _onData = Symbol('_onData');
let _onError = Symbol('_onError');
let _onDone = Symbol('_onDone');
@@ -1654,8 +1654,8 @@ var async;
class DeferredLibrary extends core.Object {
DeferredLibrary(libraryName, opts) {
let uri = opts && 'uri' in opts ? opts.uri : null;
- this.libraryName = libraryName;
- this.uri = uri;
+ dart.initField(DeferredLibrary, this, 'libraryName', libraryName);
+ dart.initField(DeferredLibrary, this, 'uri', uri);
}
load() {
throw 'DeferredLibrary not supported. ' + 'please use the `import "lib.dart" deferred as lib` syntax.';
@@ -1664,7 +1664,7 @@ var async;
let _s = Symbol('_s');
class DeferredLoadException extends core.Object {
DeferredLoadException(s) {
- this[_s] = s;
+ dart.initField(DeferredLoadException, this, _s, s);
}
toString() {
return `DeferredLoadException: '${this[_s]}'`;
@@ -1842,8 +1842,8 @@ var async;
TimeoutException(message, duration) {
if (duration === void 0)
duration = null;
- this.message = message;
- this.duration = duration;
+ dart.initField(TimeoutException, this, 'message', message);
+ dart.initField(TimeoutException, this, 'duration', duration);
}
toString() {
let result = "TimeoutException";
@@ -3562,9 +3562,9 @@ var async;
return _BroadcastSubscriptionWrapper;
});
let _BroadcastSubscriptionWrapper = _BroadcastSubscriptionWrapper$();
+ let _STATE_FOUND = Symbol('_STATE_FOUND');
let _current = Symbol('_current');
let _futureOrPrefetch = Symbol('_futureOrPrefetch');
- let _STATE_FOUND = Symbol('_STATE_FOUND');
let _STATE_DONE = Symbol('_STATE_DONE');
let _STATE_MOVING = Symbol('_STATE_MOVING');
let _STATE_EXTRA_DATA = Symbol('_STATE_EXTRA_DATA');
« no previous file with comments | « lib/runtime/dart/_native_typed_data.js ('k') | lib/runtime/dart/collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698