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

Unified Diff: runtime/bin/main.cc

Issue 2430473002: Implement File::Map on Windows. (Closed)
Patch Set: . Created 4 years, 2 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/file_win.cc ('k') | no next file » | no next file with comments »
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 10861340c162816ac3e1d4c67d8264fb2068cce5..2662466ecadaf6fc882f868476043aac4ff78ea7 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -1234,7 +1234,8 @@ static bool ReadAppSnapshotBlobs(const char* script_name,
file->Map(File::kReadOnly, vmisolate_position,
instructions_position - vmisolate_position);
if (read_only_buffer == NULL) {
- ErrorExit(kErrorExitCode, "Failed to memory map snapshot\n");
+ Log::PrintErr("Failed to memory map snapshot\n");
+ Platform::Exit(kErrorExitCode);
}
*vmisolate_buffer = reinterpret_cast<const uint8_t*>(read_only_buffer)
@@ -1254,7 +1255,8 @@ static bool ReadAppSnapshotBlobs(const char* script_name,
*instructions_buffer = reinterpret_cast<const uint8_t*>(
file->Map(File::kReadExecute, instructions_position, header[4]));
if (*instructions_buffer == NULL) {
- ErrorExit(kErrorExitCode, "Failed to memory map snapshot2\n");
+ Log::PrintErr("Failed to memory map snapshot\n");
+ Platform::Exit(kErrorExitCode);
}
}
@@ -1276,29 +1278,33 @@ static bool ReadAppSnapshotDynamicLibrary(const char* script_name,
*vmisolate_buffer = reinterpret_cast<const uint8_t*>(
Extensions::ResolveSymbol(library, kPrecompiledVMIsolateSymbolName));
if (*vmisolate_buffer == NULL) {
- ErrorExit(kErrorExitCode, "Failed to resolve symbol '%s'\n",
- kPrecompiledVMIsolateSymbolName);
+ Log::PrintErr("Failed to resolve symbol '%s'\n",
+ kPrecompiledVMIsolateSymbolName);
+ Platform::Exit(kErrorExitCode);
}
*isolate_buffer = reinterpret_cast<const uint8_t*>(
Extensions::ResolveSymbol(library, kPrecompiledIsolateSymbolName));
if (*isolate_buffer == NULL) {
- ErrorExit(kErrorExitCode, "Failed to resolve symbol '%s'\n",
- kPrecompiledIsolateSymbolName);
+ Log::PrintErr("Failed to resolve symbol '%s'\n",
+ kPrecompiledIsolateSymbolName);
+ Platform::Exit(kErrorExitCode);
}
*instructions_buffer = reinterpret_cast<const uint8_t*>(
Extensions::ResolveSymbol(library, kPrecompiledInstructionsSymbolName));
if (*instructions_buffer == NULL) {
- ErrorExit(kErrorExitCode, "Failed to resolve symbol '%s'\n",
- kPrecompiledInstructionsSymbolName);
+ Log::PrintErr("Failed to resolve symbol '%s'\n",
+ kPrecompiledInstructionsSymbolName);
+ Platform::Exit(kErrorExitCode);
}
*rodata_buffer = reinterpret_cast<const uint8_t*>(
Extensions::ResolveSymbol(library, kPrecompiledDataSymbolName));
if (*rodata_buffer == NULL) {
- ErrorExit(kErrorExitCode, "Failed to resolve symbol '%s'\n",
- kPrecompiledDataSymbolName);
+ Log::PrintErr("Failed to resolve symbol '%s'\n",
+ kPrecompiledDataSymbolName);
+ Platform::Exit(kErrorExitCode);
}
return true;
« no previous file with comments | « runtime/bin/file_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698