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