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

Unified Diff: content/app/content_main_runner.cc

Issue 1164483003: Allow startup with missing V8 snapshot file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix misplaced ifdef for Windows Created 5 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 | « components/html_viewer/setup.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index e4f8812db56671c6996adc5f70bf2ad5ed1cd42c..1a3986376225c18dc9e8b1a8894c04ecf3048cf4 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -741,17 +741,23 @@ class ContentMainRunnerImpl : public ContentMainRunner {
#endif // !OS_ANDROID
int v8_natives_fd = g_fds->MaybeGet(kV8NativesDataDescriptor);
int v8_snapshot_fd = g_fds->MaybeGet(kV8SnapshotDataDescriptor);
- if (v8_natives_fd != -1 && v8_snapshot_fd != -1) {
- auto v8_natives_region = g_fds->GetRegion(kV8NativesDataDescriptor);
+ if (v8_snapshot_fd != -1) {
auto v8_snapshot_region = g_fds->GetRegion(kV8SnapshotDataDescriptor);
- CHECK(gin::V8Initializer::LoadV8SnapshotFromFD(
- v8_natives_fd, v8_natives_region.offset, v8_natives_region.size,
- v8_snapshot_fd, v8_snapshot_region.offset, v8_snapshot_region.size));
+ gin::V8Initializer::LoadV8SnapshotFromFD(
+ v8_snapshot_fd, v8_snapshot_region.offset, v8_snapshot_region.size);
+ } else {
+ gin::V8Initializer::LoadV8Snapshot();
+ }
+ if (v8_natives_fd != -1) {
+ auto v8_natives_region = g_fds->GetRegion(kV8NativesDataDescriptor);
+ gin::V8Initializer::LoadV8NativesFromFD(
+ v8_natives_fd, v8_natives_region.offset, v8_natives_region.size);
} else {
- CHECK(gin::V8Initializer::LoadV8Snapshot());
+ gin::V8Initializer::LoadV8Natives();
}
#else
- CHECK(gin::V8Initializer::LoadV8Snapshot());
+ gin::V8Initializer::LoadV8Snapshot();
+ gin::V8Initializer::LoadV8Natives();
#endif // OS_POSIX && !OS_MACOSX
#endif // V8_USE_EXTERNAL_STARTUP_DATA
« no previous file with comments | « components/html_viewer/setup.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698