mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Try using reportAbandonedObjectGraph a lot
This commit is contained in:
@@ -36,6 +36,12 @@ pub const VM = opaque {
|
||||
JSC__VM__holdAPILock(this, ctx, callback);
|
||||
}
|
||||
|
||||
pub fn reportAbandonedObjectGraph(vm: *VM) void {
|
||||
JSC__VM__reportAbandonedObjectGraph(vm);
|
||||
}
|
||||
|
||||
extern fn JSC__VM__reportAbandonedObjectGraph(vm: *VM) void;
|
||||
|
||||
extern fn JSC__VM__getAPILock(vm: *VM) void;
|
||||
extern fn JSC__VM__releaseAPILock(vm: *VM) void;
|
||||
|
||||
|
||||
@@ -6187,6 +6187,11 @@ CPP_DECL void JSC__VM__setControlFlowProfiler(JSC__VM* vm, bool isEnabled)
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" void JSC__VM__reportAbandonedObjectGraph(JSC__VM* vm)
|
||||
{
|
||||
vm->heap.reportAbandonedObjectGraph();
|
||||
}
|
||||
|
||||
CPP_DECL void JSC__VM__performOpportunisticallyScheduledTasks(JSC__VM* vm, double until)
|
||||
{
|
||||
vm->performOpportunisticallyScheduledTasks(MonotonicTime::now() + Seconds(until), {});
|
||||
|
||||
@@ -1348,7 +1348,6 @@ pub const EventLoop = struct {
|
||||
}
|
||||
}
|
||||
|
||||
this.processGCTimer();
|
||||
this.processGCTimer();
|
||||
loop.tick();
|
||||
|
||||
@@ -1393,7 +1392,9 @@ pub const EventLoop = struct {
|
||||
ctx.onAfterEventLoop();
|
||||
}
|
||||
|
||||
pub fn processGCTimer(_: *EventLoop) void {}
|
||||
pub fn processGCTimer(this: *EventLoop) void {
|
||||
this.virtual_machine.jsc.reportAbandonedObjectGraph();
|
||||
}
|
||||
|
||||
pub fn tick(this: *EventLoop) void {
|
||||
JSC.markBinding(@src());
|
||||
|
||||
Reference in New Issue
Block a user