Index: src/profiler/sampling-heap-profiler.cc |
diff --git a/src/profiler/sampling-heap-profiler.cc b/src/profiler/sampling-heap-profiler.cc |
index a73f0789285ca050fb6f37ef10185316173ced1b..b46dff981d6da3e249f91a36d64191733c54d5ae 100644 |
--- a/src/profiler/sampling-heap-profiler.cc |
+++ b/src/profiler/sampling-heap-profiler.cc |
@@ -223,9 +223,10 @@ v8::AllocationProfile::Node* SamplingHeapProfiler::TranslateAllocationNode( |
script_name, node->script_id_, node->script_position_, line, column, |
std::vector<v8::AllocationProfile::Node*>(), allocations})); |
v8::AllocationProfile::Node* current = &profile->nodes().back(); |
- for (auto child : node->children_) { |
+ size_t child_len = node->children_.size(); |
+ for (int i = 0; i < child_len; i++) { |
alph
2016/02/25 00:49:16
I'd put a comment here about concurrent modificati
|
current->children.push_back( |
- TranslateAllocationNode(profile, child, scripts)); |
+ TranslateAllocationNode(profile, node->children_[i], scripts)); |
} |
return current; |
} |