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

Unified Diff: compiler/lib/implementation/isolate.js

Issue 8330023: Simplify isolate startup, push isolate init onto the prototype. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 2 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
Index: compiler/lib/implementation/isolate.js
===================================================================
--- compiler/lib/implementation/isolate.js (revision 479)
+++ compiler/lib/implementation/isolate.js (working copy)
@@ -4,7 +4,6 @@
var isolate$current = null;
var isolate$rootIsolate = null; // Will only be set in the main worker.
-var isolate$inits = [];
var isolate$globalThis = this;
// These declarations are needed to avoid errors from the Closure Compiler
@@ -224,14 +223,6 @@
this.token = new Object();
this.token.hashCode = (Math.random() * 0xFFFFFFF) >>> 0;
this.receivePorts = new isolate$Registry();
- this.run(function() {
- // The Dart-to-JavaScript compiler builds a list of functions that
- // need to run for each isolate to setup the state of static
- // variables. Run through the list and execute each function.
- for (var i = 0, len = isolate$inits.length; i < len; i++) {
- isolate$inits[i]();
- }
- });
}
// It is allowed to stack 'run' calls. The stacked isolates can be different.
@@ -377,7 +368,7 @@
}
function native_SendPortImpl__sendNow(message, replyTo) {
- if (replyTo !== $Dart$Null && !(replyTo instanceof SendPortImpl$Dart)) {
+ if (replyTo !== $Dart$Null && !(replyTo.$implements$SendPortImpl$Dart)) {
throw "SendPort::send: Illegal replyTo type.";
}
message = isolate$serializeMessage(message);

Powered by Google App Engine
This is Rietveld 408576698