aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/bun.js/gc.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/bun.js/gc.js b/test/bun.js/gc.js
index 6c444126f..523c5c1e4 100644
--- a/test/bun.js/gc.js
+++ b/test/bun.js/gc.js
@@ -14,6 +14,8 @@ export function gcTick(trace = false) {
}
export function withoutAggressiveGC(block) {
+ if (!Bun.unsafe.gcAggressionLevel) return block();
+
const origGC = Bun.unsafe.gcAggressionLevel();
Bun.unsafe.gcAggressionLevel(0);
try {