Index: runtime/bin/vmservice_impl.cc |
diff --git a/runtime/bin/vmservice_impl.cc b/runtime/bin/vmservice_impl.cc |
index 82968c3ae45ff5c33abeddf3e15eddbc3e57d3b0..c0512f8408ece22c8c077fecb0b347c22ce31c60 100644 |
--- a/runtime/bin/vmservice_impl.cc |
+++ b/runtime/bin/vmservice_impl.cc |
@@ -92,7 +92,6 @@ class Resources { |
DISALLOW_IMPLICIT_CONSTRUCTORS(Resources); |
}; |
- |
void NotifyServerState(Dart_NativeArguments args) { |
Dart_EnterScope(); |
const char* uri_chars; |
@@ -112,25 +111,21 @@ void NotifyServerState(Dart_NativeArguments args) { |
Dart_ExitScope(); |
} |
- |
static void Shutdown(Dart_NativeArguments args) { |
// NO-OP. |
} |
- |
struct VmServiceIONativeEntry { |
const char* name; |
int num_arguments; |
Dart_NativeFunction function; |
}; |
- |
static VmServiceIONativeEntry _VmServiceIONativeEntries[] = { |
{"VMServiceIO_NotifyServerState", 1, NotifyServerState}, |
{"VMServiceIO_Shutdown", 0, Shutdown}, |
}; |
- |
static Dart_NativeFunction VmServiceIONativeResolver(Dart_Handle name, |
int num_arguments, |
bool* auto_setup_scope) { |
@@ -151,11 +146,9 @@ static Dart_NativeFunction VmServiceIONativeResolver(Dart_Handle name, |
return NULL; |
} |
- |
const char* VmService::error_msg_ = NULL; |
char VmService::server_uri_[kServerUriStringBufferSize]; |
- |
bool VmService::LoadForGenPrecompiled(void* vmservice_kernel) { |
Dart_Handle result; |
Dart_SetLibraryTagHandler(LibraryTagHandler); |
@@ -176,7 +169,6 @@ bool VmService::LoadForGenPrecompiled(void* vmservice_kernel) { |
return true; |
} |
- |
bool VmService::Setup(const char* server_ip, |
intptr_t server_port, |
bool running_precompiled, |
@@ -291,12 +283,10 @@ bool VmService::Setup(const char* server_ip, |
return true; |
} |
- |
const char* VmService::GetErrorMessage() { |
return (error_msg_ == NULL) ? "No error." : error_msg_; |
} |
- |
void VmService::SetServerAddress(const char* server_uri) { |
if (server_uri == NULL) { |
server_uri = ""; |
@@ -309,7 +299,6 @@ void VmService::SetServerAddress(const char* server_uri) { |
server_uri_[kServerUriStringBufferSize - 1] = '\0'; |
} |
- |
Dart_Handle VmService::GetSource(const char* name) { |
const intptr_t kBufferSize = 512; |
char buffer[kBufferSize]; |
@@ -324,14 +313,12 @@ Dart_Handle VmService::GetSource(const char* name) { |
return Dart_NewStringFromCString(vmservice_source); |
} |
- |
Dart_Handle VmService::LoadScript(const char* name) { |
Dart_Handle uri = Dart_NewStringFromCString(kVMServiceIOLibraryUri); |
Dart_Handle source = GetSource(name); |
return Dart_LoadScript(uri, Dart_Null(), source, 0, 0); |
} |
- |
Dart_Handle VmService::LookupOrLoadLibrary(const char* name) { |
Dart_Handle uri = Dart_NewStringFromCString(kVMServiceIOLibraryUri); |
Dart_Handle library = Dart_LookupLibrary(uri); |
@@ -342,14 +329,12 @@ Dart_Handle VmService::LookupOrLoadLibrary(const char* name) { |
return library; |
} |
- |
Dart_Handle VmService::LoadSource(Dart_Handle library, const char* name) { |
Dart_Handle uri = Dart_NewStringFromCString(name); |
Dart_Handle source = GetSource(name); |
return Dart_LoadSource(library, uri, Dart_Null(), source, 0, 0); |
} |
- |
Dart_Handle VmService::LibraryTagHandler(Dart_LibraryTag tag, |
Dart_Handle library, |
Dart_Handle url) { |
@@ -386,6 +371,5 @@ Dart_Handle VmService::LibraryTagHandler(Dart_LibraryTag tag, |
return Dart_LoadSource(library, url, Dart_Null(), source, 0, 0); |
} |
- |
} // namespace bin |
} // namespace dart |