Index: runtime/bin/vmservice_impl.cc |
diff --git a/runtime/bin/vmservice_impl.cc b/runtime/bin/vmservice_impl.cc |
index c41fe1b8185394327864235ecb5b5d2a748f8210..6a5cfccf7d16d8174165df0e41646308f34f50be 100644 |
--- a/runtime/bin/vmservice_impl.cc |
+++ b/runtime/bin/vmservice_impl.cc |
@@ -152,11 +152,17 @@ const char* VmService::error_msg_ = NULL; |
char VmService::server_uri_[kServerUriStringBufferSize]; |
-bool VmService::LoadForGenPrecompiled() { |
+bool VmService::LoadForGenPrecompiled(void* vmservice_kernel) { |
Dart_Handle result; |
Dart_SetLibraryTagHandler(LibraryTagHandler); |
- Dart_Handle library = |
- LookupOrLoadLibrary(kVMServiceIOLibraryScriptResourceName); |
+ Dart_Handle library; |
+ if (vmservice_kernel != NULL) { |
+ library = Dart_LoadLibrary( |
+ Dart_NewStringFromCString(kVMServiceIOLibraryUri), Dart_Null(), |
+ reinterpret_cast<Dart_Handle>(vmservice_kernel), 0, 0); |
+ } else { |
+ library = LookupOrLoadLibrary(kVMServiceIOLibraryScriptResourceName); |
+ } |
ASSERT(library != Dart_Null()); |
SHUTDOWN_ON_ERROR(library); |
result = Dart_SetNativeResolver(library, VmServiceIONativeResolver, NULL); |