| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index 9cc4154d1f00cb60d65fcc13148d6e400c56256b..ef7030e7aaddb23b7e44519fb191fa3db35628d7 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -715,12 +715,9 @@ void Heap::GarbageCollectionEpilogue() {
|
|
|
|
|
| void Heap::PreprocessStackTraces() {
|
| - if (!weak_stack_trace_list()->IsWeakFixedArray()) return;
|
| - WeakFixedArray* array = WeakFixedArray::cast(weak_stack_trace_list());
|
| - int length = array->Length();
|
| - for (int i = 0; i < length; i++) {
|
| - if (array->IsEmptySlot(i)) continue;
|
| - FixedArray* elements = FixedArray::cast(array->Get(i));
|
| + WeakFixedArray::Iterator iterator(weak_stack_trace_list());
|
| + FixedArray* elements;
|
| + while ((elements = iterator.Next<FixedArray>())) {
|
| for (int j = 1; j < elements->length(); j += 4) {
|
| Object* maybe_code = elements->get(j + 2);
|
| // If GC happens while adding a stack trace to the weak fixed array,
|
|
|