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 bc33726b6e50cd3e7ea0db4076c7c668f682e716..2c6a992b5bdc8b193dd056b781ad7ab387055aca 100644 |
| --- a/content/app/content_main_runner.cc |
| +++ b/content/app/content_main_runner.cc |
| @@ -50,6 +50,10 @@ |
| #include "ui/base/ui_base_paths.h" |
| #include "ui/base/ui_base_switches.h" |
| +#ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| +#include "gin/public/isolate_holder.h" |
| +#endif |
| + |
| #if defined(OS_ANDROID) |
| #include "content/public/common/content_descriptors.h" |
| #endif |
| @@ -717,9 +721,25 @@ class ContentMainRunnerImpl : public ContentMainRunner { |
| CHECK(base::i18n::InitializeICUWithFileDescriptor(icudata_fd)); |
| else |
| CHECK(base::i18n::InitializeICU()); |
| + |
| +#ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| + int v8_natives_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( |
| + kV8NativesDataDescriptor); |
| + int v8_snapshot_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( |
| + kV8SnapshotDataDescriptor); |
| + if (v8_natives_fd != -1 && v8_snapshot_fd != -1) |
|
rmcilroy
2014/10/07 16:16:10
use "{" when a block takes more than one line (eve
baixo
2014/10/08 11:28:54
Done.
|
| + CHECK(gin::IsolateHolder::LoadV8SnapshotFD(v8_natives_fd, |
| + v8_snapshot_fd)); |
| + else |
| + CHECK(gin::IsolateHolder::LoadV8Snapshot()); |
| +#endif // V8_USE_EXTERNAL_STARTUP_DATA |
| + |
| #else |
| CHECK(base::i18n::InitializeICU()); |
| -#endif |
| +#ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| + CHECK(gin::IsolateHolder::LoadV8Snapshot()); |
| +#endif // V8_USE_EXTERNAL_STARTUP_DATA |
| +#endif // OS_ANDROID |
| InitializeStatsTable(command_line); |