Chromium Code Reviews| 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 { |