aboutsummaryrefslogtreecommitdiffstats
path: root/wasm/setjmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'wasm/setjmp.c')
-rw-r--r--wasm/setjmp.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/wasm/setjmp.c b/wasm/setjmp.c
index 0663b57300..198d210bbf 100644
--- a/wasm/setjmp.c
+++ b/wasm/setjmp.c
@@ -165,9 +165,9 @@ rb_wasm_try_catch_loop_run(struct rb_wasm_try_catch *try_catch, rb_wasm_jmp_buf
break;
}
- while (1) {
+ {
// catch longjmp with target jmp_buf
- if (rb_asyncify_unwind_buf && _rb_wasm_active_jmpbuf == target) {
+ while (rb_asyncify_unwind_buf && _rb_wasm_active_jmpbuf == target) {
// do similar steps setjmp does when JMP_BUF_STATE_RETURNING
// stop unwinding
@@ -182,14 +182,9 @@ rb_wasm_try_catch_loop_run(struct rb_wasm_try_catch *try_catch, rb_wasm_jmp_buf
if (try_catch->catch_f) {
try_catch->catch_f(try_catch->context);
}
- continue;
- } else if (rb_asyncify_unwind_buf /* unrelated unwind */) {
- return;
}
- // no unwind, then exit
- break;
+ // no unwind or unrelated unwind, then exit
}
- return;
}
void *