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

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

Issue 112223002: WebSocket client for VM service (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "bin/vmservice_impl.h" 5 #include "bin/vmservice_impl.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // closures and setting up 'package root' for URI resolution. 119 // closures and setting up 'package root' for URI resolution.
120 result = DartUtils::PrepareForScriptLoading("", builtin_lib); 120 result = DartUtils::PrepareForScriptLoading("", builtin_lib);
121 SHUTDOWN_ON_ERROR(result); 121 SHUTDOWN_ON_ERROR(result);
122 122
123 { 123 {
124 // Load source into service isolate. 124 // Load source into service isolate.
125 Dart_Handle library = LoadScript(kVMServiceIOLibraryScriptResourceName); 125 Dart_Handle library = LoadScript(kVMServiceIOLibraryScriptResourceName);
126 SHUTDOWN_ON_ERROR(library); 126 SHUTDOWN_ON_ERROR(library);
127 } 127 }
128 128
129 result = Dart_CompileAll();
130 SHUTDOWN_ON_ERROR(result);
131
129 // Make the isolate runnable so that it is ready to handle messages. 132 // Make the isolate runnable so that it is ready to handle messages.
130 Dart_ExitScope(); 133 Dart_ExitScope();
131 Dart_ExitIsolate(); 134 Dart_ExitIsolate();
132 135
133 bool retval = Dart_IsolateMakeRunnable(isolate_); 136 bool retval = Dart_IsolateMakeRunnable(isolate_);
134 if (!retval) { 137 if (!retval) {
135 Dart_EnterIsolate(isolate_); 138 Dart_EnterIsolate(isolate_);
136 Dart_ShutdownIsolate(); 139 Dart_ShutdownIsolate();
137 error_msg_ = "Invalid isolate state - Unable to make it runnable."; 140 error_msg_ = "Invalid isolate state - Unable to make it runnable.";
138 return false; 141 return false;
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 if (!strcmp(function_name, entry.name) && 557 if (!strcmp(function_name, entry.name) &&
555 (num_arguments == entry.num_arguments)) { 558 (num_arguments == entry.num_arguments)) {
556 return entry.function; 559 return entry.function;
557 } 560 }
558 } 561 }
559 return NULL; 562 return NULL;
560 } 563 }
561 564
562 } // namespace bin 565 } // namespace bin
563 } // namespace dart 566 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698