mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 05:12:29 +00:00
windows: handling uncaughtException shouldnt infer tickPossiblyForever with libuv
This commit is contained in:
@@ -307,11 +307,15 @@ pub const Run = struct {
|
||||
if (vm.loadEntryPoint(this.entry_path)) |promise| {
|
||||
if (promise.status(vm.global.vm()) == .Rejected) {
|
||||
const handled = vm.uncaughtException(vm.global, promise.result(vm.global.vm()), true);
|
||||
const hot_reload = vm.hot_reload != .none;
|
||||
|
||||
if (vm.hot_reload != .none or handled) {
|
||||
if (handled) {
|
||||
vm.eventLoop().tick();
|
||||
}
|
||||
if (hot_reload) {
|
||||
vm.eventLoop().tickPossiblyForever();
|
||||
} else {
|
||||
}
|
||||
if (!handled and !hot_reload) {
|
||||
vm.exit_handler.exit_code = 1;
|
||||
vm.onExit();
|
||||
|
||||
|
||||
@@ -885,7 +885,7 @@ describe("process.exitCode", () => {
|
||||
]).toRunInlineFixture();
|
||||
});
|
||||
|
||||
it.todoIf(isWindows)("zeroExitWithUncaughtHandler", () => {
|
||||
it("zeroExitWithUncaughtHandler", () => {
|
||||
expect([
|
||||
`
|
||||
process.on('exit', (code) => {
|
||||
@@ -906,7 +906,7 @@ describe("process.exitCode", () => {
|
||||
]).toRunInlineFixture();
|
||||
});
|
||||
|
||||
it.todoIf(isWindows)("changeCodeInUncaughtHandler", () => {
|
||||
it("changeCodeInUncaughtHandler", () => {
|
||||
expect([
|
||||
`
|
||||
process.on('exit', (code) => {
|
||||
|
||||
Reference in New Issue
Block a user