summaryrefslogtreecommitdiff
path: root/deps/v8/src/v8.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/v8.cc')
-rw-r--r--deps/v8/src/v8.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/deps/v8/src/v8.cc b/deps/v8/src/v8.cc
index 16107fdefc..a6d97e8ff1 100644
--- a/deps/v8/src/v8.cc
+++ b/deps/v8/src/v8.cc
@@ -19,6 +19,7 @@
#include "src/objects-inl.h"
#include "src/profiler/heap-profiler.h"
#include "src/runtime-profiler.h"
+#include "src/simulator.h"
#include "src/snapshot/natives.h"
#include "src/snapshot/snapshot.h"
#include "src/tracing/tracing-category-observer.h"
@@ -42,6 +43,9 @@ bool V8::Initialize() {
void V8::TearDown() {
+#if defined(USE_SIMULATOR)
+ Simulator::GlobalTearDown();
+#endif
Bootstrapper::TearDownExtensions();
ElementsAccessor::TearDown();
RegisteredExtension::UnregisterAll();
@@ -65,10 +69,15 @@ void V8::InitializeOncePerProcessImpl() {
FLAG_max_semi_space_size = 1;
}
- base::OS::Initialize(FLAG_random_seed, FLAG_hard_abort, FLAG_gc_fake_mmap);
+ base::OS::Initialize(FLAG_hard_abort, FLAG_gc_fake_mmap);
+
+ if (FLAG_random_seed) SetRandomMmapSeed(FLAG_random_seed);
Isolate::InitializeOncePerProcess();
+#if defined(USE_SIMULATOR)
+ Simulator::InitializeOncePerProcess();
+#endif
sampler::Sampler::SetUp();
CpuFeatures::Probe(false);
ElementsAccessor::InitializeOncePerProcess();
@@ -116,7 +125,7 @@ void V8::SetNativesBlob(StartupData* natives_blob) {
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
base::CallOnce(&init_natives_once, &SetNativesFromFile, natives_blob);
#else
- CHECK(false);
+ UNREACHABLE();
#endif
}
@@ -125,7 +134,7 @@ void V8::SetSnapshotBlob(StartupData* snapshot_blob) {
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
base::CallOnce(&init_snapshot_once, &SetSnapshotFromFile, snapshot_blob);
#else
- CHECK(false);
+ UNREACHABLE();
#endif
}
} // namespace internal