Chromium Code Reviews| Index: content/app/content_main_runner.cc |
| diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc |
| index 279536b09b983deec9ae5f22856e5c0bbb72f83a..3fc6e83c159dc3cc0088adeef86171295d86b9a9 100644 |
| --- a/content/app/content_main_runner.cc |
| +++ b/content/app/content_main_runner.cc |
| @@ -728,17 +728,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)); |
| } else { |
| - CHECK(gin::V8Initializer::LoadV8Snapshot()); |
| + gin::V8Initializer::LoadV8Snapshot(); |
| + } |
| + if (v8_natives_fd != -1) { |
| + auto v8_natives_region = g_fds->GetRegion(kV8NativesDataDescriptor); |
| + CHECK(gin::V8Initializer::LoadV8SnapshotFromFD( |
| + v8_natives_fd, v8_natives_region.offset, v8_natives_region.size)); |
| + } else { |
| + CHECK(gin::V8Initializer::LoadV8Natives()); |
| } |
| #else |
| - CHECK(gin::V8Initializer::LoadV8Snapshot()); |
| + gin::V8Initializer::LoadV8Snapshot(); |
|
rmcilroy
2015/06/01 14:06:31
Maybe we should make it obvious from the function
Erik Corry Chromium.org
2015/06/02 11:18:52
Not sure I want to CHECK it. Lets say it's there,
rmcilroy
2015/06/02 11:27:07
As discussed below, let's get rid of the return va
|
| + CHECK(gin::V8Initializer::LoadV8Natives()); |
| #endif // OS_POSIX && !OS_MACOSX |
| #endif // V8_USE_EXTERNAL_STARTUP_DATA |