Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: src/profiler/tick-sample.cc

Issue 2274573007: Fix GetStackSample to check for nullptr (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/tick-sample.cc
diff --git a/src/profiler/tick-sample.cc b/src/profiler/tick-sample.cc
index e51f939e835e8cc616f26c7664c2bd77ac8c8997..ecb2bf46f787c8d4aa58b6969a928ee4e7757d2f 100644
--- a/src/profiler/tick-sample.cc
+++ b/src/profiler/tick-sample.cc
@@ -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),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698