Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: runtime/bin/main.cc

Issue 38703009: Update VM service to new isolate API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/vmservice/running_isolate.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 Dart_GetType(io_lib, platform_class_name, 0, NULL); 488 Dart_GetType(io_lib, platform_class_name, 0, NULL);
489 CHECK_RESULT(platform_type); 489 CHECK_RESULT(platform_type);
490 Dart_Handle script_name_name = DartUtils::NewString("_nativeScript"); 490 Dart_Handle script_name_name = DartUtils::NewString("_nativeScript");
491 CHECK_RESULT(script_name_name); 491 CHECK_RESULT(script_name_name);
492 Dart_Handle dart_script = DartUtils::NewString(script_uri); 492 Dart_Handle dart_script = DartUtils::NewString(script_uri);
493 CHECK_RESULT(dart_script); 493 CHECK_RESULT(dart_script);
494 Dart_Handle set_script_name = 494 Dart_Handle set_script_name =
495 Dart_SetField(platform_type, script_name_name, dart_script); 495 Dart_SetField(platform_type, script_name_name, dart_script);
496 CHECK_RESULT(set_script_name); 496 CHECK_RESULT(set_script_name);
497 497
498 Dart_Handle debug_name = Dart_DebugName(); 498 VmService::SendIsolateStartupMessage();
499 CHECK_RESULT(debug_name);
500 VmService::SendIsolateStartupMessage(Dart_GetMainPortId(), debug_name);
501 499
502 // Make the isolate runnable so that it is ready to handle messages. 500 // Make the isolate runnable so that it is ready to handle messages.
503 Dart_ExitScope(); 501 Dart_ExitScope();
504 Dart_ExitIsolate(); 502 Dart_ExitIsolate();
505 bool retval = Dart_IsolateMakeRunnable(isolate); 503 bool retval = Dart_IsolateMakeRunnable(isolate);
506 if (!retval) { 504 if (!retval) {
507 *error = strdup("Invalid isolate state - Unable to make it runnable"); 505 *error = strdup("Invalid isolate state - Unable to make it runnable");
508 Dart_EnterIsolate(isolate); 506 Dart_EnterIsolate(isolate);
509 Dart_ShutdownIsolate(); 507 Dart_ShutdownIsolate();
510 return NULL; 508 return NULL;
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 933
936 return Process::GlobalExitCode(); 934 return Process::GlobalExitCode();
937 } 935 }
938 936
939 } // namespace bin 937 } // namespace bin
940 } // namespace dart 938 } // namespace dart
941 939
942 int main(int argc, char** argv) { 940 int main(int argc, char** argv) {
943 return dart::bin::main(argc, argv); 941 return dart::bin::main(argc, argv);
944 } 942 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/vmservice/running_isolate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698