[in-place weak refs] Fix HeapSnapshotGenerator.

WeakFixedArrays can also contain strong pointers.

(Separating this fix from
https://chromium-review.googlesource.com/c/v8/v8/+/1075053 ; after that CL tests
will fail without this fix.)

BUG=v8:7308

Change-Id: I0d47ab179625bcbf6149cf02ad696f8af250ae8d
Reviewed-on: https://chromium-review.googlesource.com/1075270
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53386}
This commit is contained in:
Marja Hölttä 2018-05-28 15:33:57 +02:00 committed by Commit Bot
parent 21eb2029d0
commit da2be4d030

View File

@ -1416,6 +1416,9 @@ void V8HeapExplorer::ExtractWeakArrayReferences(int header_size, int entry,
if (object->ToWeakHeapObject(&heap_object)) {
SetWeakReference(array, entry, i, heap_object,
header_size + i * kPointerSize);
} else if (object->ToStrongHeapObject(&heap_object)) {
SetInternalReference(array, entry, i, heap_object,
header_size + i * kPointerSize);
}
}
}