deps: V8: cherry-pick f4b860d · nodejs/node@2ea9de2 (original) (raw)
`@@ -531,14 +531,9 @@ TEST(WeakGlobalHandlesScavenge) {
`
531
531
``
532
532
`// Scavenge treats weak pointers as normal roots.
`
533
533
`CcTest::CollectGarbage(NEW_SPACE);
`
534
``
-
535
534
`CHECK((*h1)->IsString());
`
536
535
`CHECK((*h2)->IsHeapNumber());
`
537
``
-
538
536
`CHECK(!WeakPointerCleared);
`
539
``
`-
CHECK(!global_handles->IsNearDeath(h2.location()));
`
540
``
`-
CHECK(!global_handles->IsNearDeath(h1.location()));
`
541
``
-
542
537
`GlobalHandles::Destroy(h1.location());
`
543
538
`GlobalHandles::Destroy(h2.location());
`
544
539
`}
`
`@@ -576,11 +571,8 @@ TEST(WeakGlobalUnmodifiedApiHandlesScavenge) {
`
576
571
` &TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
`
577
572
``
578
573
`CcTest::CollectGarbage(NEW_SPACE);
`
579
``
-
580
574
`CHECK((*h1)->IsHeapNumber());
`
581
575
`CHECK(WeakPointerCleared);
`
582
``
`-
CHECK(!global_handles->IsNearDeath(h1.location()));
`
583
``
-
584
576
`GlobalHandles::Destroy(h1.location());
`
585
577
`}
`
586
578
``
`@@ -617,10 +609,7 @@ TEST(WeakGlobalApiHandleModifiedMapScavenge) {
`
617
609
` &TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
`
618
610
``
619
611
`CcTest::CollectGarbage(NEW_SPACE);
`
620
``
-
621
612
`CHECK(!WeakPointerCleared);
`
622
``
`-
CHECK(!global_handles->IsNearDeath(h1.location()));
`
623
``
-
624
613
`GlobalHandles::Destroy(h1.location());
`
625
614
`}
`
626
615
``
`@@ -661,10 +650,7 @@ TEST(WeakGlobalApiHandleWithElementsScavenge) {
`
661
650
` &TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
`
662
651
``
663
652
`CcTest::CollectGarbage(NEW_SPACE);
`
664
``
-
665
653
`CHECK(!WeakPointerCleared);
`
666
``
`-
CHECK(!global_handles->IsNearDeath(h1.location()));
`
667
``
-
668
654
`GlobalHandles::Destroy(h1.location());
`
669
655
`}
`
670
656
``
`@@ -699,17 +685,11 @@ TEST(WeakGlobalHandlesMark) {
`
699
685
`GlobalHandles::MakeWeak(
`
700
686
` h2.location(), reinterpret_cast<void*>(&handle_and_id),
`
701
687
` &TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
`
702
``
`-
CHECK(!GlobalHandles::IsNearDeath(h1.location()));
`
703
``
`-
CHECK(!GlobalHandles::IsNearDeath(h2.location()));
`
704
688
``
705
689
`// Incremental marking potentially marked handles before they turned weak.
`
706
690
`CcTest::CollectAllGarbage();
`
707
``
-
708
691
`CHECK((*h1)->IsString());
`
709
``
-
710
692
`CHECK(WeakPointerCleared);
`
711
``
`-
CHECK(!GlobalHandles::IsNearDeath(h1.location()));
`
712
``
-
713
693
`GlobalHandles::Destroy(h1.location());
`
714
694
`}
`
715
695
``