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

Unified Diff: runtime/bin/main.cc

Issue 2583673002: When creating a JIT app snapshot, don't recreate the VM isolate snapshot. (Closed)
Patch Set: Created 4 years 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 | « no previous file | runtime/include/dart_api.h » ('j') | runtime/vm/stub_code.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 28804f4a1b6deccf32c39e52e95fbbe3a5cd4882..e2e739e837057db9ce01574cbad7183087cbba97 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -1297,8 +1297,10 @@ static bool ReadAppSnapshotBlobs(const char* script_name,
Platform::Exit(kErrorExitCode);
}
- *vmisolate_buffer = reinterpret_cast<const uint8_t*>(read_only_buffer) +
- (vmisolate_position - vmisolate_position);
+ if (vmisolate_size != 0) {
+ *vmisolate_buffer = reinterpret_cast<const uint8_t*>(read_only_buffer) +
+ (vmisolate_position - vmisolate_position);
+ }
*isolate_buffer = reinterpret_cast<const uint8_t*>(read_only_buffer) +
(isolate_position - vmisolate_position);
if (rodata_size == 0) {
@@ -1507,9 +1509,8 @@ static void GeneratePrecompiledJITSnapshot() {
uint8_t* rodata_blob_buffer = NULL;
intptr_t rodata_blob_size = 0;
Dart_Handle result = Dart_CreateAppJITSnapshot(
- &vm_isolate_buffer, &vm_isolate_size, &isolate_buffer, &isolate_size,
- &instructions_blob_buffer, &instructions_blob_size, &rodata_blob_buffer,
- &rodata_blob_size);
+ &isolate_buffer, &isolate_size, &instructions_blob_buffer,
+ &instructions_blob_size, &rodata_blob_buffer, &rodata_blob_size);
if (Dart_IsError(result)) {
ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result));
}
« no previous file with comments | « no previous file | runtime/include/dart_api.h » ('j') | runtime/vm/stub_code.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698