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

Unified Diff: src/d8.cc

Issue 1292053002: Rework startup-data-util. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Same as Patch Set 3, but revert the "Test for all platforms" bits. Created 5 years, 4 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 | « src/api.cc ('k') | src/d8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 5fa7c262994c77076951bf97022d00e2c0119731..d1eb9592777b3cfe2270df001c36db49885447c5 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -49,10 +49,6 @@
#include "src/v8.h"
#endif // !V8_SHARED
-#ifdef V8_USE_EXTERNAL_STARTUP_DATA
-#include "src/startup-data-util.h"
-#endif // V8_USE_EXTERNAL_STARTUP_DATA
-
#if !defined(_WIN32) && !defined(_WIN64)
#include <unistd.h> // NOLINT
#else
@@ -2357,10 +2353,12 @@ int Shell::Main(int argc, char* argv[]) {
g_platform = v8::platform::CreateDefaultPlatform();
v8::V8::InitializePlatform(g_platform);
v8::V8::Initialize();
-#ifdef V8_USE_EXTERNAL_STARTUP_DATA
- v8::StartupDataHandler startup_data(argv[0], options.natives_blob,
- options.snapshot_blob);
-#endif
+ if (options.natives_blob || options.snapshot_blob) {
+ v8::V8::InitializeExternalStartupData(options.natives_blob,
+ options.snapshot_blob);
+ } else {
+ v8::V8::InitializeExternalStartupData(argv[0]);
+ }
SetFlagsFromString("--trace-hydrogen-file=hydrogen.cfg");
SetFlagsFromString("--trace-turbo-cfg-file=turbo.cfg");
SetFlagsFromString("--redirect-code-traces-to=code.asm");
« no previous file with comments | « src/api.cc ('k') | src/d8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698