From f2c22f03f3204e80ee2211f37fac9aa78f81a690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Sun, 14 Jul 2024 15:18:55 +0900 Subject: [PATCH] fix perf bug --- crates/swc_allocator/src/alloc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/swc_allocator/src/alloc.rs b/crates/swc_allocator/src/alloc.rs index 934eabbc9e05..7d109734bdd8 100644 --- a/crates/swc_allocator/src/alloc.rs +++ b/crates/swc_allocator/src/alloc.rs @@ -34,7 +34,7 @@ impl SwcAlloc { &self, f: impl FnOnce(&dyn allocator_api2::alloc::Allocator, bool) -> T, ) -> T { - if ALLOC.is_set() { + if self.is_arena_mode { ALLOC.with(|a| { // f(&&**a as &dyn allocator_api2::alloc::Allocator, true)