| Index: runtime/bin/main.cc
|
| ===================================================================
|
| --- runtime/bin/main.cc (revision 19996)
|
| +++ runtime/bin/main.cc (working copy)
|
| @@ -863,18 +863,18 @@
|
| if (Dart_IsError(result)) {
|
| return ErrorExit("%s\n", Dart_GetError(result));
|
| }
|
| + } else {
|
| + // Lookup and invoke the top level main function.
|
| + result = Dart_Invoke(library, DartUtils::NewString("main"), 0, NULL);
|
| + if (Dart_IsError(result)) {
|
| + return ErrorExit("%s\n", Dart_GetError(result));
|
| + }
|
| + // Keep handling messages until the last active receive port is closed.
|
| + result = Dart_RunLoop();
|
| + if (Dart_IsError(result)) {
|
| + return ErrorExit("%s\n", Dart_GetError(result));
|
| + }
|
| }
|
| -
|
| - // Lookup and invoke the top level main function.
|
| - result = Dart_Invoke(library, DartUtils::NewString("main"), 0, NULL);
|
| - if (Dart_IsError(result)) {
|
| - return ErrorExit("%s\n", Dart_GetError(result));
|
| - }
|
| - // Keep handling messages until the last active receive port is closed.
|
| - result = Dart_RunLoop();
|
| - if (Dart_IsError(result)) {
|
| - return ErrorExit("%s\n", Dart_GetError(result));
|
| - }
|
| }
|
|
|
| Dart_ExitScope();
|
|
|