Commit 23a9405c authored by jyan's avatar jyan Committed by Commit bot

Fix GetStackSample to check for nullptr

callback_entrypoint_address call could return nullptr and therefore
causes seg fault intermittently.

R=jochen@chromium.org, lpy@chromium.org, yangguo@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2274573007
Cr-Commit-Position: refs/heads/master@{#38952}
parent 97118fb5
......@@ -214,8 +214,11 @@ bool TickSample::GetStackSample(Isolate* v8_isolate, RegisterState* regs,
// we have already entrered JavaScript again and the external callback
// is not the top function.
if (scope && scope->scope_address() < handler) {
i::Address* external_callback_entry_ptr =
scope->callback_entrypoint_address();
sample_info->external_callback_entry =
*scope->callback_entrypoint_address();
external_callback_entry_ptr == nullptr ? nullptr
: *external_callback_entry_ptr;
}
i::SafeStackFrameIterator it(isolate, reinterpret_cast<i::Address>(regs->fp),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment