diff --git a/BUILD.bazel b/BUILD.bazel index be1aa33fe4..589f579c2c 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -165,7 +165,6 @@ config_setting( # v8_control_flow_integrity # v8_enable_virtual_memory_cage # cppgc_enable_caged_heap -# cppgc_enable_check_assignments_in_prefinalizers # cppgc_enable_object_names # cppgc_enable_verify_heap # cppgc_enable_young_generation diff --git a/BUILD.gn b/BUILD.gn index 7ea3de83e3..a2a4e51e13 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -293,10 +293,6 @@ declare_args() { # Enables additional heap verification phases and checks. cppgc_enable_verify_heap = "" - # Enable assignment checks for Members/Persistents during prefinalizer invocations. - # TODO(v8:11749): Enable by default after fixing any existing issues in Blink. - cppgc_enable_check_assignments_in_prefinalizers = false - # Enable allocations during prefinalizer invocations. cppgc_allow_allocations_in_prefinalizers = false @@ -790,10 +786,6 @@ config("features") { defines += [ "CPPGC_VERIFY_HEAP" ] } - if (cppgc_enable_check_assignments_in_prefinalizers) { - defines += [ "CPPGC_CHECK_ASSIGNMENTS_IN_PREFINALIZERS" ] - } - if (cppgc_allow_allocations_in_prefinalizers) { defines += [ "CPPGC_ALLOW_ALLOCATIONS_IN_PREFINALIZERS" ] } diff --git a/src/heap/cppgc/pointer-policies.cc b/src/heap/cppgc/pointer-policies.cc index 3c7cb61761..a3718a183d 100644 --- a/src/heap/cppgc/pointer-policies.cc +++ b/src/heap/cppgc/pointer-policies.cc @@ -68,7 +68,7 @@ void EnabledCheckingPolicy::CheckPointerImpl(const void* ptr, DCHECK(!header->IsFree()); } -#ifdef CPPGC_CHECK_ASSIGNMENTS_IN_PREFINALIZERS +#ifdef CPPGC_VERIFY_HEAP if (heap_->prefinalizer_handler()->IsInvokingPreFinalizers()) { // During prefinalizers invocation, check that |ptr| refers to a live object // and that it is assigned to a live slot. @@ -81,7 +81,7 @@ void EnabledCheckingPolicy::CheckPointerImpl(const void* ptr, DCHECK(slot_is_live); USE(slot_is_live); } -#endif // CPPGC_CHECK_ASSIGNMENTS_IN_PREFINALIZERS +#endif // CPPGC_VERIFY_HEAP } PersistentRegion& StrongPersistentPolicy::GetPersistentRegion( diff --git a/test/unittests/heap/cppgc/prefinalizer-unittest.cc b/test/unittests/heap/cppgc/prefinalizer-unittest.cc index 3f01b5178f..b0cd98cb28 100644 --- a/test/unittests/heap/cppgc/prefinalizer-unittest.cc +++ b/test/unittests/heap/cppgc/prefinalizer-unittest.cc @@ -292,7 +292,7 @@ class GCedHolder : public GarbageCollected { } // namespace #if V8_ENABLE_CHECKS -#ifdef CPPGC_CHECK_ASSIGNMENTS_IN_PREFINALIZERS +#ifdef CPPGC_VERIFY_HEAP TEST_F(PrefinalizerDeathTest, PrefinalizerCantRewireGraphWithDeadObjects) { Persistent root{MakeGarbageCollected( @@ -325,7 +325,7 @@ TEST_F(PrefinalizerDeathTest, PrefinalizerCantRessurectObjectOnHeap) { EXPECT_DEATH_IF_SUPPORTED(PreciseGC(), ""); } -#endif // CPPGC_CHECK_ASSIGNMENTS_IN_PREFINALIZERS +#endif // CPPGC_VERIFY_HEAP #endif // V8_ENABLE_CHECKS #ifdef CPPGC_ALLOW_ALLOCATIONS_IN_PREFINALIZERS diff --git a/tools/cppgc/gen_cmake.py b/tools/cppgc/gen_cmake.py index 1063455b7f..b4a805c07c 100755 --- a/tools/cppgc/gen_cmake.py +++ b/tools/cppgc/gen_cmake.py @@ -245,7 +245,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) option(CPPGC_ENABLE_OBJECT_NAMES "Enable object names in cppgc for debug purposes" OFF) option(CPPGC_ENABLE_CAGED_HEAP "Enable heap reservation of size 4GB, only possible for 64bit archs" OFF) option(CPPGC_ENABLE_VERIFY_HEAP "Enables additional heap verification phases and checks" OFF) -option(CPPGC_CHECK_ASSIGNMENTS_IN_PREFINALIZERS " Enable assignment checks for Members/Persistents during prefinalizer invocations" OFF) option(CPPGC_ENABLE_YOUNG_GENERATION "Enable young generation in cppgc" OFF) set(CPPGC_TARGET_ARCH "x64" CACHE STRING "Target architecture, possible options: x64, x86, arm, arm64, ppc64, s390x, mipsel, mips64el") @@ -438,9 +437,6 @@ endif() if(CPPGC_ENABLE_VERIFY_HEAP) target_compile_definitions({target.name} PRIVATE "-DCPPGC_ENABLE_VERIFY_HEAP") endif() -if(CPPGC_CHECK_ASSIGNMENTS_IN_PREFINALIZERS) - target_compile_definitions({target.name} PRIVATE "-DCPPGC_CHECK_ASSIGNMENTS_IN_PREFINALIZERS") -endif() if(CPPGC_ENABLE_YOUNG_GENERATION) target_compile_definitions({target.name} PRIVATE "-DCPPGC_YOUNG_GENERATION") endif()"""