| Index: src/profiler/sampling-heap-profiler.cc
|
| diff --git a/src/profiler/sampling-heap-profiler.cc b/src/profiler/sampling-heap-profiler.cc
|
| index b38643cf1a3a67e1516146219fd4ef86a9c12ae4..59968ec7d41759d821ca9df13b200c224666f78a 100644
|
| --- a/src/profiler/sampling-heap-profiler.cc
|
| +++ b/src/profiler/sampling-heap-profiler.cc
|
| @@ -200,7 +200,8 @@ v8::AllocationProfile::Node* SamplingHeapProfiler::TranslateAllocationNode(
|
| int column = v8::AllocationProfile::kNoColumnNumberInfo;
|
| std::vector<v8::AllocationProfile::Allocation> allocations;
|
| allocations.reserve(node->allocations_.size());
|
| - if (node->script_id_ != v8::UnboundScript::kNoScriptId) {
|
| + if (node->script_id_ != v8::UnboundScript::kNoScriptId &&
|
| + scripts.find(node->script_id_) != scripts.end()) {
|
| // Cannot use std::map<T>::at because it is not available on android.
|
| auto non_const_scripts = const_cast<std::map<int, Script*>&>(scripts);
|
| Script* script = non_const_scripts[node->script_id_];
|
|
|