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.cc49
1 files changed, 24 insertions, 25 deletions
diff --git a/deps/v8/src/v8.cc b/deps/v8/src/v8.cc
index 2407037b3..2e8cd50e6 100644
--- a/deps/v8/src/v8.cc
+++ b/deps/v8/src/v8.cc
@@ -38,6 +38,7 @@
#include "hydrogen.h"
#include "lithium-allocator.h"
#include "log.h"
+#include "objects.h"
#include "once.h"
#include "platform.h"
#include "runtime-profiler.h"
@@ -62,8 +63,6 @@ static EntropySource entropy_source;
bool V8::Initialize(Deserializer* des) {
- FlagList::EnforceFlagImplications();
-
InitializeOncePerProcess();
// The current thread may not yet had entered an isolate to run.
@@ -114,7 +113,9 @@ void V8::TearDown() {
ElementsAccessor::TearDown();
LOperand::TearDownCaches();
+ ExternalReference::TearDownMathExpData();
RegisteredExtension::UnregisterAll();
+ Isolate::GlobalTearDown();
is_running_ = false;
has_been_disposed_ = true;
@@ -216,14 +217,22 @@ void V8::RemoveCallCompletedCallback(CallCompletedCallback callback) {
void V8::FireCallCompletedCallback(Isolate* isolate) {
- if (call_completed_callbacks_ == NULL) return;
+ bool has_call_completed_callbacks = call_completed_callbacks_ != NULL;
+ bool observer_delivery_pending =
+ FLAG_harmony_observation && isolate->observer_delivery_pending();
+ if (!has_call_completed_callbacks && !observer_delivery_pending) return;
HandleScopeImplementer* handle_scope_implementer =
isolate->handle_scope_implementer();
if (!handle_scope_implementer->CallDepthIsZero()) return;
// Fire callbacks. Increase call depth to prevent recursive callbacks.
handle_scope_implementer->IncrementCallDepth();
- for (int i = 0; i < call_completed_callbacks_->length(); i++) {
- call_completed_callbacks_->at(i)();
+ if (observer_delivery_pending) {
+ JSObject::DeliverChangeRecords(isolate);
+ }
+ if (has_call_completed_callbacks) {
+ for (int i = 0; i < call_completed_callbacks_->length(); i++) {
+ call_completed_callbacks_->at(i)();
+ }
}
handle_scope_implementer->DecrementCallDepth();
}
@@ -253,31 +262,21 @@ Object* V8::FillHeapNumberWithRandom(Object* heap_number,
}
void V8::InitializeOncePerProcessImpl() {
- OS::SetUp();
-
- use_crankshaft_ = FLAG_crankshaft;
-
- if (Serializer::enabled()) {
- use_crankshaft_ = false;
- }
-
- CPU::SetUp();
- if (!CPU::SupportsCrankshaft()) {
- use_crankshaft_ = false;
- }
-
- OS::PostSetUp();
-
- RuntimeProfiler::GlobalSetUp();
-
- ElementsAccessor::InitializeOncePerProcess();
-
+ FlagList::EnforceFlagImplications();
if (FLAG_stress_compaction) {
FLAG_force_marking_deque_overflows = true;
FLAG_gc_global = true;
FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2;
}
-
+ if (FLAG_trace_hydrogen) FLAG_parallel_recompilation = false;
+ OS::SetUp();
+ CPU::SetUp();
+ use_crankshaft_ = FLAG_crankshaft
+ && !Serializer::enabled()
+ && CPU::SupportsCrankshaft();
+ OS::PostSetUp();
+ RuntimeProfiler::GlobalSetUp();
+ ElementsAccessor::InitializeOncePerProcess();
LOperand::SetUpCaches();
SetUpJSCallerSavedCodeData();
SamplerRegistry::SetUp();