On window.close, reset the frame's scheduler

Saw that worker.close() does this and it makes sense to do for window.close()
too.
This commit is contained in:
Karl Seguin
2026-05-04 11:31:02 +08:00
parent 87b7ebfc00
commit 2ee398b6d5

View File

@@ -568,6 +568,8 @@ pub fn close(self: *Window) void {
}
}
frame.js.scheduler.reset();
// We can't tear the Frame down here — close() is invoked from JS still
// running on top of this Frame's V8 context, often deep inside a script
// eval whose parser is still holding the Frame. Destroying the context