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

Unified Diff: runtime/bin/vmservice_impl.cc

Issue 2949323002: Load vmservice from a .dill file when generating AOT snapshots. (Closed)
Patch Set: Address comments Created 3 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/vmservice_impl.h ('k') | runtime/tests/vm/vm.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « runtime/bin/vmservice_impl.h ('k') | runtime/tests/vm/vm.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698