Skip to content

Commit a343d10

Browse files
committed
chore: Ignore gc() calls if Agent options disabled GC
1 parent d31406a commit a343d10

File tree

1 file changed

+4
-0
lines changed
  • nova_vm/src/ecmascript/execution

1 file changed

+4
-0
lines changed

nova_vm/src/ecmascript/execution/agent.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ impl GcAgent {
147147
}
148148

149149
pub fn gc(&mut self) {
150+
if self.agent.options.disable_gc {
151+
// GC is disabled; no-op
152+
return;
153+
}
150154
heap_gc(&mut self.agent.heap, &mut self.root_realms);
151155
}
152156
}

0 commit comments

Comments
 (0)