fix: release 构建下 debug 断言调用点补 cfg 守卫

collect_strings_only 中 debug 兜底断言调用点无 cfg 守卫,release
(无 debug_assertions)下方法不存在导致编译失败;与定义侧守卫对齐。
This commit is contained in:
2026-08-15 14:31:43 +08:00
parent ee592bf7e7
commit f25a3a1b95
+2
View File
@@ -596,6 +596,8 @@ impl SessionGc {
self.mark(vm);
// debug 兜底:存活对象的字符串边必须已登记,否则串清扫将释放活串。
// cfg 守卫与定义一致:release 下断言体剥离,调用点同步剥离。
#[cfg(debug_assertions)]
self.debug_assert_marked_object_strings_live(vm);
// 扣减字符串账目(保留对象账目),再补回存活串字节。