| 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_debugger_api.h" | 10 #include "include/dart_debugger_api.h" |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 Dart_GetType(io_lib, platform_class_name, 0, NULL); | 484 Dart_GetType(io_lib, platform_class_name, 0, NULL); |
| 485 CHECK_RESULT(platform_type); | 485 CHECK_RESULT(platform_type); |
| 486 Dart_Handle script_name_name = DartUtils::NewString("_nativeScript"); | 486 Dart_Handle script_name_name = DartUtils::NewString("_nativeScript"); |
| 487 CHECK_RESULT(script_name_name); | 487 CHECK_RESULT(script_name_name); |
| 488 Dart_Handle dart_script = DartUtils::NewString(script_uri); | 488 Dart_Handle dart_script = DartUtils::NewString(script_uri); |
| 489 CHECK_RESULT(dart_script); | 489 CHECK_RESULT(dart_script); |
| 490 Dart_Handle set_script_name = | 490 Dart_Handle set_script_name = |
| 491 Dart_SetField(platform_type, script_name_name, dart_script); | 491 Dart_SetField(platform_type, script_name_name, dart_script); |
| 492 CHECK_RESULT(set_script_name); | 492 CHECK_RESULT(set_script_name); |
| 493 | 493 |
| 494 Dart_Handle debug_name = Dart_DebugName(); | 494 VmService::SendIsolateStartupMessage(); |
| 495 CHECK_RESULT(debug_name); | |
| 496 VmService::SendIsolateStartupMessage(Dart_GetMainPortId(), debug_name); | |
| 497 | 495 |
| 498 // Make the isolate runnable so that it is ready to handle messages. | 496 // Make the isolate runnable so that it is ready to handle messages. |
| 499 Dart_ExitScope(); | 497 Dart_ExitScope(); |
| 500 Dart_ExitIsolate(); | 498 Dart_ExitIsolate(); |
| 501 bool retval = Dart_IsolateMakeRunnable(isolate); | 499 bool retval = Dart_IsolateMakeRunnable(isolate); |
| 502 if (!retval) { | 500 if (!retval) { |
| 503 *error = strdup("Invalid isolate state - Unable to make it runnable"); | 501 *error = strdup("Invalid isolate state - Unable to make it runnable"); |
| 504 Dart_EnterIsolate(isolate); | 502 Dart_EnterIsolate(isolate); |
| 505 Dart_ShutdownIsolate(); | 503 Dart_ShutdownIsolate(); |
| 506 return NULL; | 504 return NULL; |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 | 899 |
| 902 return Process::GlobalExitCode(); | 900 return Process::GlobalExitCode(); |
| 903 } | 901 } |
| 904 | 902 |
| 905 } // namespace bin | 903 } // namespace bin |
| 906 } // namespace dart | 904 } // namespace dart |
| 907 | 905 |
| 908 int main(int argc, char** argv) { | 906 int main(int argc, char** argv) { |
| 909 return dart::bin::main(argc, argv); | 907 return dart::bin::main(argc, argv); |
| 910 } | 908 } |
| OLD | NEW |