Index: content/app/content_main_runner.cc |
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc |
index 32dd24ef38cab7b06c639924cb01075f7c09edad..a607ae5de300b8915915482edf9d563643b3e33b 100644 |
--- a/content/app/content_main_runner.cc |
+++ b/content/app/content_main_runner.cc |
@@ -15,6 +15,9 @@ |
#include "base/i18n/icu_util.h" |
#include "base/lazy_instance.h" |
#include "base/logging.h" |
+#if defined(V8_USE_EXTERNAL_STARTUP_DATA) && defined(OS_MACOSX) |
+#include "base/mac/bundle_locations.h" |
+#endif |
rmcilroy
2014/09/23 10:04:20
I'm not sure you need this here either?
baixo
2014/09/23 11:36:46
Done.
|
#include "base/memory/scoped_ptr.h" |
#include "base/memory/scoped_vector.h" |
#include "base/metrics/stats_table.h" |
@@ -43,6 +46,9 @@ |
#include "content/renderer/in_process_renderer_thread.h" |
#include "content/utility/in_process_utility_thread.h" |
#include "crypto/nss_util.h" |
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA |
+#include "gin/public/isolate_holder.h" |
+#endif // V8_USE_EXTERNAL_STARTUP_DATA |
#include "ipc/ipc_descriptors.h" |
#include "ipc/ipc_switches.h" |
#include "media/base/media.h" |
@@ -715,9 +721,24 @@ 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) |
+ CHECK(gin::IsolateHolder::LoadV8SnapshotFD(v8_natives_fd, |
+ v8_snapshot_fd)); |
+ else |
+ CHECK(gin::IsolateHolder::LoadV8Snapshot()); |
+#endif // V8_USE_EXTERNAL_STARTUP_DATA |
#else |
rmcilroy
2014/09/23 10:04:20
nit - newline before the #else
baixo
2014/09/23 11:36:46
Done.
|
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); |