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

Unified Diff: lib/runtime/dart/_isolate_helper.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/_internal.js ('k') | lib/runtime/dart/_js_helper.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_isolate_helper.js
diff --git a/lib/runtime/dart/_isolate_helper.js b/lib/runtime/dart/_isolate_helper.js
index 0fdbdfe3bf62ca387f590aa292c21f658ce81809..830c7b2558e967b06e2485b18deda665edf631fd 100644
--- a/lib/runtime/dart/_isolate_helper.js
+++ b/lib/runtime/dart/_isolate_helper.js
@@ -1196,33 +1196,33 @@ var _isolate_helper;
}
}
_WorkerSendPort[dart.implements] = () => [isolate.SendPort];
- let _handler = Symbol('_handler');
let _nextFreeId = Symbol('_nextFreeId');
+ let _handler = Symbol('_handler');
class RawReceivePortImpl extends core.Object {
RawReceivePortImpl(handler) {
- this[_handler] = handler;
- this[_id] = (() => {
+ dart.initField(RawReceivePortImpl, this, _handler, handler);
+ dart.initField(RawReceivePortImpl, this, _id, (() => {
let x = RawReceivePortImpl[_nextFreeId];
RawReceivePortImpl[_nextFreeId] = dart.notNull(x) + 1;
return x;
- })();
- this[_isClosed] = false;
+ })());
+ dart.initField(RawReceivePortImpl, this, _isClosed, false);
exports._globalState.currentContext.register(this[_id], this);
}
weak(handler) {
- this[_handler] = handler;
- this[_id] = (() => {
+ dart.initField(RawReceivePortImpl, this, _handler, handler);
+ dart.initField(RawReceivePortImpl, this, _id, (() => {
let x = RawReceivePortImpl[_nextFreeId];
RawReceivePortImpl[_nextFreeId] = dart.notNull(x) + 1;
return x;
- })();
- this[_isClosed] = false;
+ })());
+ dart.initField(RawReceivePortImpl, this, _isClosed, false);
exports._globalState.currentContext.registerWeak(this[_id], this);
}
[_controlPort]() {
- this[_handler] = null;
- this[_id] = 0;
- this[_isClosed] = false;
+ dart.initField(RawReceivePortImpl, this, _handler, null);
+ dart.initField(RawReceivePortImpl, this, _id, 0);
+ dart.initField(RawReceivePortImpl, this, _isClosed, false);
}
set handler(newHandler) {
this[_handler] = newHandler;
@@ -1289,9 +1289,9 @@ var _isolate_helper;
let _handle = Symbol('_handle');
class TimerImpl extends core.Object {
TimerImpl(milliseconds, callback) {
- this[_once] = true;
- this[_inEventLoop] = false;
- this[_handle] = null;
+ dart.initField(TimerImpl, this, _once, true);
+ dart.initField(TimerImpl, this, _inEventLoop, false);
+ dart.initField(TimerImpl, this, _handle, null);
if (milliseconds == 0 && (!dart.notNull(hasTimer()) || dart.notNull(exports._globalState.isWorker))) {
// Function internalCallback: () → void
function internalCallback() {
@@ -1316,9 +1316,9 @@ var _isolate_helper;
}
}
periodic(milliseconds, callback) {
- this[_once] = false;
- this[_inEventLoop] = false;
- this[_handle] = null;
+ dart.initField(TimerImpl, this, _once, false);
+ dart.initField(TimerImpl, this, _inEventLoop, false);
+ dart.initField(TimerImpl, this, _handle, null);
if (hasTimer()) {
enterJsAsync();
this[_handle] = self.setInterval(_js_helper.convertDartClosureToJS((() => {
@@ -1363,7 +1363,7 @@ var _isolate_helper;
this[_internal](_js_helper.random64());
}
[_internal](id) {
- this[_id] = id;
+ dart.initField(CapabilityImpl, this, _id, id);
}
get hashCode() {
let hash = this[_id];
« no previous file with comments | « lib/runtime/dart/_internal.js ('k') | lib/runtime/dart/_js_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698