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

Unified Diff: src/d8.cc

Issue 345903004: Split out libplatform into a separate libary (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
« samples/process.cc ('K') | « 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 8bdf26f4c27bbb4bd063196b0be3ad76d6552d6f..33d3a2a0087fd1b61c253888eeb4b2f6132d6690 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -35,6 +35,7 @@
#include "src/d8.h"
+#include "include/libplatform/libplatform.h"
#ifndef V8_SHARED
#include "src/api.h"
#include "src/base/cpu.h"
@@ -1549,6 +1550,9 @@ class StartupDataHandler {
int Shell::Main(int argc, char* argv[]) {
if (!SetOptions(argc, argv)) return 1;
v8::V8::InitializeICU(options.icu_data_file);
+ v8::Platform* platform =
+ v8::platform::CreateDefaultPlatform(base::OS::NumberOfProcessorsOnline());
+ v8::V8::InitializePlatform(platform);
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
StartupDataHandler startup_data(options.natives_blob, options.snapshot_blob);
#endif
@@ -1626,6 +1630,8 @@ int Shell::Main(int argc, char* argv[]) {
}
isolate->Dispose();
V8::Dispose();
+ V8::ShutdownPlatform();
+ delete platform;
OnExit();
« samples/process.cc ('K') | « src/api.cc ('k') | src/d8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698