| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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_dartium.h" | 5 #include "bin/vmservice_dartium.h" |
| 6 | 6 |
| 7 #include "bin/builtin.h" | 7 #include "bin/builtin.h" |
| 8 #include "bin/dartutils.h" | 8 #include "bin/dartutils.h" |
| 9 #include "bin/eventhandler.h" | 9 #include "bin/eventhandler.h" |
| 10 #include "bin/platform.h" | 10 #include "bin/platform.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 Dart_Handle result; | 63 Dart_Handle result; |
| 64 | 64 |
| 65 // Prepare for script loading by setting up the 'print' and 'timer' | 65 // Prepare for script loading by setting up the 'print' and 'timer' |
| 66 // closures and setting up 'package root' for URI resolution. | 66 // closures and setting up 'package root' for URI resolution. |
| 67 result = DartUtils::PrepareForScriptLoading( | 67 result = DartUtils::PrepareForScriptLoading( |
| 68 NULL, NULL, NULL, true, false, builtin_lib); | 68 NULL, NULL, NULL, true, false, builtin_lib); |
| 69 CHECK_RESULT(result); | 69 CHECK_RESULT(result); |
| 70 | 70 |
| 71 ASSERT(Dart_IsServiceIsolate(isolate)); | 71 ASSERT(Dart_IsServiceIsolate(isolate)); |
| 72 if (!VmService::Setup(DEFAULT_VM_SERVICE_SERVER_IP, | 72 if (!VmService::Setup(DEFAULT_VM_SERVICE_SERVER_IP, |
| 73 DEFAULT_VM_SERVICE_SERVER_PORT)) { | 73 DEFAULT_VM_SERVICE_SERVER_PORT, |
| 74 false /* running_precompiled */)) { |
| 74 fprintf(stderr, | 75 fprintf(stderr, |
| 75 "Vmservice::Setup failed: %s\n", VmService::GetErrorMessage()); | 76 "Vmservice::Setup failed: %s\n", VmService::GetErrorMessage()); |
| 76 isolate = NULL; | 77 isolate = NULL; |
| 77 } | 78 } |
| 78 Dart_ExitScope(); | 79 Dart_ExitScope(); |
| 79 Dart_ExitIsolate(); | 80 Dart_ExitIsolate(); |
| 80 return isolate; | 81 return isolate; |
| 81 } | 82 } |
| 82 | 83 |
| 83 | 84 |
| 84 const char* VmServiceServer::GetServerIP() { | 85 const char* VmServiceServer::GetServerIP() { |
| 85 return VmService::GetServerIP(); | 86 return VmService::GetServerIP(); |
| 86 } | 87 } |
| 87 | 88 |
| 88 | 89 |
| 89 intptr_t VmServiceServer::GetServerPort() { | 90 intptr_t VmServiceServer::GetServerPort() { |
| 90 return VmService::GetServerPort(); | 91 return VmService::GetServerPort(); |
| 91 } | 92 } |
| 92 | 93 |
| 93 | 94 |
| 94 /* DISALLOW_ALLOCATION */ | 95 /* DISALLOW_ALLOCATION */ |
| 95 void VmServiceServer::operator delete(void* pointer) { | 96 void VmServiceServer::operator delete(void* pointer) { |
| 96 fprintf(stderr, "unreachable code\n"); | 97 fprintf(stderr, "unreachable code\n"); |
| 97 abort(); | 98 abort(); |
| 98 } | 99 } |
| 99 | 100 |
| 100 } // namespace bin | 101 } // namespace bin |
| 101 } // namespace dart | 102 } // namespace dart |
| OLD | NEW |