Index: src/cpu-profiler.cc |
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc |
index 082e2532ebce5363cef9d669e7494c8909f11e5b..3894748174a98862121b1d471ec3a94337389d9a 100644 |
--- a/src/cpu-profiler.cc |
+++ b/src/cpu-profiler.cc |
@@ -184,12 +184,13 @@ void ProfilerEventsProcessor::RegExpCodeCreateEvent( |
void ProfilerEventsProcessor::AddCurrentStack() { |
TickSampleEventRecord record; |
TickSample* sample = &record.sample; |
- sample->state = Isolate::Current()->current_vm_state(); |
+ Isolate* isolate = Isolate::Current(); |
+ sample->state = isolate->current_vm_state(); |
sample->pc = reinterpret_cast<Address>(sample); // Not NULL. |
sample->tos = NULL; |
sample->has_external_callback = false; |
sample->frames_count = 0; |
- for (StackTraceFrameIterator it; |
+ for (StackTraceFrameIterator it(isolate); |
!it.done() && sample->frames_count < TickSample::kMaxFramesCount; |
it.Advance()) { |
sample->stack[sample->frames_count++] = it.frame()->pc(); |