Index: test/cctest/test-heap.cc |
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
index 8858a82d9adf7f838a0add8538918278d1ba7748..9cada2f0e57fc22c03062a8e703eb9c645f41359 100644 |
--- a/test/cctest/test-heap.cc |
+++ b/test/cctest/test-heap.cc |
@@ -5369,3 +5369,15 @@ TEST(Regress472513) { |
TestRightTrimFixedTypedArray(i::kExternalUint16Array, 8 - 1, 3); |
TestRightTrimFixedTypedArray(i::kExternalUint32Array, 4, 3); |
} |
+ |
+ |
+TEST(WeakFixedArray) { |
+ CcTest::InitializeVM(); |
+ v8::HandleScope scope(CcTest::isolate()); |
+ |
+ Handle<HeapNumber> number = CcTest::i_isolate()->factory()->NewHeapNumber(1); |
+ Handle<WeakFixedArray> array = WeakFixedArray::Add(Handle<Object>(), number); |
+ array->Remove(number); |
+ array->Compact(); |
+ WeakFixedArray::Add(array, number); |
+} |