OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include <stdlib.h> | 5 #include <stdlib.h> |
6 #include <string.h> | 6 #include <string.h> |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
10 #include "include/dart_tools_api.h" | 10 #include "include/dart_tools_api.h" |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 CHECK_RESULT(result); | 757 CHECK_RESULT(result); |
758 | 758 |
759 // Run event-loop and wait for script loading to complete. | 759 // Run event-loop and wait for script loading to complete. |
760 result = Dart_RunLoop(); | 760 result = Dart_RunLoop(); |
761 CHECK_RESULT(result); | 761 CHECK_RESULT(result); |
762 | 762 |
763 if (isolate_data->load_async_id >= 0) { | 763 if (isolate_data->load_async_id >= 0) { |
764 Dart_TimelineAsyncEnd("LoadScript", isolate_data->load_async_id); | 764 Dart_TimelineAsyncEnd("LoadScript", isolate_data->load_async_id); |
765 } | 765 } |
766 | 766 |
767 Platform::SetPackageRoot(package_root); | |
768 | |
769 result = DartUtils::SetupIOLibrary(script_uri); | 767 result = DartUtils::SetupIOLibrary(script_uri); |
770 CHECK_RESULT(result); | 768 CHECK_RESULT(result); |
771 } | 769 } |
772 | 770 |
773 // Make the isolate runnable so that it is ready to handle messages. | 771 // Make the isolate runnable so that it is ready to handle messages. |
774 Dart_ExitScope(); | 772 Dart_ExitScope(); |
775 Dart_ExitIsolate(); | 773 Dart_ExitIsolate(); |
776 bool retval = Dart_IsolateMakeRunnable(isolate); | 774 bool retval = Dart_IsolateMakeRunnable(isolate); |
777 if (!retval) { | 775 if (!retval) { |
778 *error = strdup("Invalid isolate state - Unable to make it runnable"); | 776 *error = strdup("Invalid isolate state - Unable to make it runnable"); |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 Platform::Exit(Process::GlobalExitCode()); | 1491 Platform::Exit(Process::GlobalExitCode()); |
1494 } | 1492 } |
1495 | 1493 |
1496 } // namespace bin | 1494 } // namespace bin |
1497 } // namespace dart | 1495 } // namespace dart |
1498 | 1496 |
1499 int main(int argc, char** argv) { | 1497 int main(int argc, char** argv) { |
1500 dart::bin::main(argc, argv); | 1498 dart::bin::main(argc, argv); |
1501 UNREACHABLE(); | 1499 UNREACHABLE(); |
1502 } | 1500 } |
OLD | NEW |