| Index: pkg/dev_compiler/tool/run.js
|
| diff --git a/pkg/dev_compiler/tool/run.js b/pkg/dev_compiler/tool/run.js
|
| index a7de6ca85cbfd703943baf0489f90e3a4371d759..cca3aeb94bc9c0360113220e2a016c5bdd61126f 100644
|
| --- a/pkg/dev_compiler/tool/run.js
|
| +++ b/pkg/dev_compiler/tool/run.js
|
| @@ -54,20 +54,21 @@ function finish(e) {
|
| }
|
|
|
| var async_helper = requirejs('async_helper').async_helper;
|
| +sdk._isolate_helper.startRootIsolate(() => {}, []);
|
| async_helper.asyncTestInitialize(finish);
|
|
|
| var module = requirejs(test);
|
| var lib = test.split('/').slice(-1)[0];
|
| try {
|
| - var result = sdk._isolate_helper.startRootIsolate(module[lib].main, []);
|
| + var result = module[lib].main();
|
| // async_helper tests call finish directly - call here for all other
|
| // tests.
|
| if (!async_helper.asyncTestStarted) {
|
| - if (!result || !(result instanceof dart_sdk.async.Future)) {
|
| + if (!result || !(sdk.async.Future.is(result))) {
|
| finish();
|
| } else {
|
| // Wait iff result is a future
|
| - result.then(dart_sdk.dart.dynamic)(() => finish());
|
| + result.then(sdk.dart.dynamic)(() => finish(), { onError: (e) => finish(e) });
|
| }
|
| }
|
| } catch (e) {
|
|
|