Compare commits

...

1 Commits

Author SHA1 Message Date
Meghan Denny
e2787f0961 windows: handling uncaughtException shouldnt infer tickPossiblyForever with libuv 2024-08-02 19:32:57 -07:00
2 changed files with 8 additions and 4 deletions

View File

@@ -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();

View File

@@ -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) => {