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

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

Issue 8440065: Simulate VM behavior wrt open receive ports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/lib/implementation/isolate.js
diff --git a/compiler/lib/implementation/isolate.js b/compiler/lib/implementation/isolate.js
index ade42a0e9a68a1b2cb01572433fdfe43d1b7e88e..6e17cbaa70ae5c13bd12a2ff6c21e4beeaca2968 100644
--- a/compiler/lib/implementation/isolate.js
+++ b/compiler/lib/implementation/isolate.js
@@ -388,13 +388,15 @@ function isolate$doOneEventLoopIteration() {
if (!event) {
if (isolate$inWorker) {
isolate$closeWorkerIfNecessary();
- } else if (!isolate$isolateRegistry.isEmpty() &&
+ } else if (isolate$isolateRegistry.get(isolate$rootIsolate.id) &&
kasperl 2011/11/03 13:16:00 I would compare this against null.
floitsch 2011/11/03 13:28:53 added .contains method.
isolate$workerRegistry.isEmpty() &&
!isolate$supportsWorkers && (typeof(window) == 'undefined')) {
- // This should only trigger when running on the command-line.
- // We don't want this check to execute in the browser where the isolate
- // might still be alive due to DOM callbacks.
- // throw Error("Program exited with open ReceivePorts.");
+ // No events anymore, but the main-worker still has open receive-ports.
+ // This simulates the VM's behavior (which instead times out).
+ // We only trigger this message when we run on the console (where we
+ // don't have workers). We don't want this check to execute in the browser
+ // where the isolate might still be alive due to DOM callbacks.
+ throw Error("Program exited with open ReceivePorts.");
}
return STOP_LOOP;
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698