| Index: src/heap/objects-visiting.cc
|
| diff --git a/src/heap/objects-visiting.cc b/src/heap/objects-visiting.cc
|
| index 520e539c7cca5e779f71aa1096ad72e4b2fd20c7..cf71fb2bdaf540423a3ec3c8f46c03771d1a888b 100644
|
| --- a/src/heap/objects-visiting.cc
|
| +++ b/src/heap/objects-visiting.cc
|
| @@ -192,7 +192,7 @@ struct WeakListVisitor;
|
|
|
| template <class T>
|
| Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer,
|
| - bool stop_after_young) {
|
| + bool stop_after_young, Object** list_tail) {
|
| Object* undefined = heap->undefined_value();
|
| Object* head = undefined;
|
| T* tail = NULL;
|
| @@ -237,6 +237,7 @@ Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer,
|
| // Terminate the list if there is one or more elements.
|
| if (tail != NULL) {
|
| WeakListVisitor<T>::SetWeakNext(tail, undefined);
|
| + if (list_tail) *list_tail = tail;
|
| }
|
| return head;
|
| }
|
| @@ -370,7 +371,7 @@ struct WeakListVisitor<Context> {
|
| WeakObjectRetainer* retainer, int index) {
|
| // Visit the weak list, removing dead intermediate elements.
|
| Object* list_head =
|
| - VisitWeakList<T>(heap, context->get(index), retainer, false);
|
| + VisitWeakList<T>(heap, context->get(index), retainer, false, NULL);
|
|
|
| // Update the list head.
|
| context->set(index, list_head, UPDATE_WRITE_BARRIER);
|
| @@ -422,7 +423,7 @@ struct WeakListVisitor<JSArrayBuffer> {
|
| static void VisitLiveObject(Heap* heap, JSArrayBuffer* array_buffer,
|
| WeakObjectRetainer* retainer) {
|
| Object* typed_array_obj = VisitWeakList<JSArrayBufferView>(
|
| - heap, array_buffer->weak_first_view(), retainer, false);
|
| + heap, array_buffer->weak_first_view(), retainer, false, NULL);
|
| array_buffer->set_weak_first_view(typed_array_obj);
|
| if (typed_array_obj != heap->undefined_value() && MustRecordSlots(heap)) {
|
| Object** slot = HeapObject::RawField(array_buffer,
|
| @@ -455,19 +456,23 @@ struct WeakListVisitor<AllocationSite> {
|
|
|
| template Object* VisitWeakList<Context>(Heap* heap, Object* list,
|
| WeakObjectRetainer* retainer,
|
| - bool stop_after_young);
|
| + bool stop_after_young,
|
| + Object** list_tail);
|
|
|
|
|
| template Object* VisitWeakList<JSArrayBuffer>(Heap* heap, Object* list,
|
| WeakObjectRetainer* retainer,
|
| - bool stop_after_young);
|
| + bool stop_after_young,
|
| + Object** list_tail);
|
|
|
| template Object* VisitWeakList<JSArrayBufferView>(Heap* heap, Object* list,
|
| WeakObjectRetainer* retainer,
|
| - bool stop_after_young);
|
| + bool stop_after_young,
|
| + Object** list_tail);
|
|
|
| template Object* VisitWeakList<AllocationSite>(Heap* heap, Object* list,
|
| WeakObjectRetainer* retainer,
|
| - bool stop_after_young);
|
| + bool stop_after_young,
|
| + Object** list_tail);
|
| }
|
| } // namespace v8::internal
|
|
|