Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index fc0cef022bbc34352702370420982499ded9cd93..b45cf2543a4cb09c7d813514b49c6344b3608142 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -7656,20 +7656,13 @@ bool Isolate::GetHeapCodeAndMetadataStatistics( |
void Isolate::GetStackSample(const RegisterState& state, void** frames, |
size_t frames_limit, SampleInfo* sample_info) { |
-#if defined(USE_SIMULATOR) |
- RegisterState regs; |
- i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
- if (!i::SimulatorHelper::FillRegisters(isolate, ®s)) { |
- sample_info->frames_count = 0; |
- sample_info->vm_state = OTHER; |
- sample_info->external_callback_entry = nullptr; |
+ if (TickSample::GetStackSample(this, state, TickSample::kSkipCEntryFrame, |
+ frames, frames_limit, sample_info)) { |
return; |
} |
-#else |
- const RegisterState& regs = state; |
-#endif |
- TickSample::GetStackSample(this, regs, TickSample::kSkipCEntryFrame, frames, |
- frames_limit, sample_info); |
+ sample_info->frames_count = 0; |
+ sample_info->vm_state = OTHER; |
+ sample_info->external_callback_entry = nullptr; |
} |
size_t Isolate::NumberOfPhantomHandleResetsSinceLastCall() { |