Index: src/vm-state-inl.h |
diff --git a/src/vm-state-inl.h b/src/vm-state-inl.h |
index 00a3683ebb61c932b1c9543e35e6e00c656d4b20..f00cf12c3b4a889862f3a872508b0573d39b23f0 100644 |
--- a/src/vm-state-inl.h |
+++ b/src/vm-state-inl.h |
@@ -58,15 +58,15 @@ VMState<Tag>::~VMState() { |
ExternalCallbackScope::ExternalCallbackScope(Isolate* isolate, Address callback) |
: isolate_(isolate), |
callback_(callback), |
- previous_scope_(isolate->external_callback_scope()), |
- timer_(&isolate->counters()->runtime_call_stats()->ExternalCallback, |
- isolate->counters()->runtime_call_stats()->current_timer()) { |
+ previous_scope_(isolate->external_callback_scope()) { |
#ifdef USE_SIMULATOR |
scope_address_ = Simulator::current(isolate)->get_sp(); |
#endif |
isolate_->set_external_callback_scope(this); |
if (FLAG_runtime_call_stats) { |
- isolate_->counters()->runtime_call_stats()->Enter(&timer_); |
+ RuntimeCallStats* stats = isolate->counters()->runtime_call_stats(); |
+ timer_.Initialize(&stats->ExternalCallback, stats->current_timer()); |
+ stats->Enter(&timer_); |
} |
} |