| OLD | NEW | 
|---|
| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 154   return NULL; | 154   return NULL; | 
| 155 } | 155 } | 
| 156 | 156 | 
| 157 | 157 | 
| 158 const char* VmService::error_msg_ = NULL; | 158 const char* VmService::error_msg_ = NULL; | 
| 159 char VmService::server_ip_[kServerIpStringBufferSize]; | 159 char VmService::server_ip_[kServerIpStringBufferSize]; | 
| 160 intptr_t VmService::server_port_ = 0; | 160 intptr_t VmService::server_port_ = 0; | 
| 161 | 161 | 
| 162 bool VmService::Setup(const char* server_ip, intptr_t server_port) { | 162 bool VmService::Setup(const char* server_ip, intptr_t server_port) { | 
| 163   Dart_Isolate isolate = Dart_CurrentIsolate(); | 163   Dart_Isolate isolate = Dart_CurrentIsolate(); | 
| 164   ASSERT(isolate != DART_ILLEGAL_ISOLATE); | 164   ASSERT(isolate != NULL); | 
| 165   SetServerIPAndPort("", 0); | 165   SetServerIPAndPort("", 0); | 
| 166 | 166 | 
| 167   Dart_Handle result; | 167   Dart_Handle result; | 
| 168 | 168 | 
| 169   Dart_Handle builtin_lib = | 169   Dart_Handle builtin_lib = | 
| 170       Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); | 170       Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); | 
| 171   SHUTDOWN_ON_ERROR(builtin_lib); | 171   SHUTDOWN_ON_ERROR(builtin_lib); | 
| 172 | 172 | 
| 173   // Prepare for script loading by setting up the 'print' and 'timer' | 173   // Prepare for script loading by setting up the 'print' and 'timer' | 
| 174   // closures and setting up 'package root' for URI resolution. | 174   // closures and setting up 'package root' for URI resolution. | 
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 376   Dart_Handle source = GetSource(url_string); | 376   Dart_Handle source = GetSource(url_string); | 
| 377   if (Dart_IsError(source)) { | 377   if (Dart_IsError(source)) { | 
| 378     return source; | 378     return source; | 
| 379   } | 379   } | 
| 380   return Dart_LoadSource(library, url, source, 0, 0); | 380   return Dart_LoadSource(library, url, source, 0, 0); | 
| 381 } | 381 } | 
| 382 | 382 | 
| 383 | 383 | 
| 384 }  // namespace bin | 384 }  // namespace bin | 
| 385 }  // namespace dart | 385 }  // namespace dart | 
| OLD | NEW | 
|---|