Skip to content

Commit 246d01a

Browse files
committed
fix merge conflict
1 parent cdcd79e commit 246d01a

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

crates/core/src/host/v8/mod.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,8 +1519,11 @@ async fn spawn_instance_worker(
15191519
Ok((rcr, trapped)) => (Ok(rcr), trapped),
15201520
Err(err) => (Err(err), false),
15211521
};
1522-
worker_trapped.store(trapped, Ordering::Relaxed);
1523-
send_worker_reply("call_reducer", reply_tx, res, trapped);
1522+
if trapped {
1523+
worker_state_in_thread.mark_trapped();
1524+
}
1525+
1526+
send_worker_reply("call_reducer", reply_tx, res);
15241527
should_exit = trapped;
15251528
}
15261529
JsWorkerRequest::CallReducerWithSuccessAction {
@@ -1535,8 +1538,11 @@ async fn spawn_instance_worker(
15351538
action,
15361539
|tx, params, on_success| call_reducer_with_success(tx, params, on_success),
15371540
);
1538-
worker_trapped.store(trapped, Ordering::Relaxed);
1539-
send_worker_reply("call_reducer", reply_tx, res, trapped);
1541+
if trapped {
1542+
worker_state_in_thread.mark_trapped();
1543+
}
1544+
1545+
send_worker_reply("call_reducer", reply_tx, res);
15401546
should_exit = trapped;
15411547
}
15421548
JsWorkerRequest::CallView { reply_tx, cmd } => {

0 commit comments

Comments
 (0)