@@ -94,9 +94,19 @@ declare_args() {
9494 # See v8:7381 for more details.
9595 v8_enable_private_mapping_fork_optimization = false
9696
97- # Sets -DENABLE_HANDLE_ZAPPING.
97+ # Sets the default for v8_enable_local_handle_zapping and
98+ # v8_enable_global_handle_zapping.
9899 v8_enable_handle_zapping = is_asan || is_debug
99100
101+ # Sets -DENABLE_LOCAL_HANDLE_ZAPPING, which is more expensive than just
102+ # the global handles. By default it is enabled if v8_enable_handle_zapping
103+ # is enabled.
104+ v8_enable_local_handle_zapping = " "
105+
106+ # Sets -DENABLE_GLOBAL_HANDLE_ZAPPING. By default it is enabled if
107+ # v8_enable_handle_zapping is enabled.
108+ v8_enable_global_handle_zapping = " "
109+
100110 # Enable slow dchecks.
101111 v8_enable_slow_dchecks = false
102112
@@ -542,6 +552,12 @@ if (v8_enable_pointer_compression_shared_cage == "") {
542552if (v8_enable_pointer_compression_8gb == " " ) {
543553 v8_enable_pointer_compression_8gb = false
544554}
555+ if (v8_enable_local_handle_zapping == " " ) {
556+ v8_enable_local_handle_zapping = v8_enable_handle_zapping
557+ }
558+ if (v8_enable_global_handle_zapping == " " ) {
559+ v8_enable_global_handle_zapping = v8_enable_handle_zapping
560+ }
545561if (v8_enable_fast_torque == " " ) {
546562 v8_enable_fast_torque = v8_enable_fast_mksnapshot
547563}
@@ -1187,8 +1203,11 @@ config("features") {
11871203 if (v8_enable_i18n_support ) {
11881204 defines += [ " V8_INTL_SUPPORT" ]
11891205 }
1190- if (v8_enable_handle_zapping ) {
1191- defines += [ " ENABLE_HANDLE_ZAPPING" ]
1206+ if (v8_enable_local_handle_zapping ) {
1207+ defines += [ " ENABLE_LOCAL_HANDLE_ZAPPING" ]
1208+ }
1209+ if (v8_enable_global_handle_zapping ) {
1210+ defines += [ " ENABLE_GLOBAL_HANDLE_ZAPPING" ]
11921211 }
11931212 if (v8_code_comments == true ) {
11941213 defines += [ " V8_CODE_COMMENTS" ]
0 commit comments