fix(ThreadsafeFunction): ensure CalleeHandled works as expected (#2039)
This was refactored in 4719caa643
. This codepath
was swapped, as the fatal exception must be the normal codepath when the callee
handled field is false. This fixes it by swapping this if statement, all the
other calls have been checked and seem fine.
This commit is contained in:
parent
cc937e1dba
commit
19dbadefba
1 changed files with 1 additions and 1 deletions
|
@ -658,7 +658,7 @@ unsafe extern "C" fn call_js_cb<
|
|||
)
|
||||
},
|
||||
Err(e) => {
|
||||
if CalleeHandled {
|
||||
if !CalleeHandled {
|
||||
unsafe { sys::napi_fatal_exception(raw_env, JsError::from(e).into_value(raw_env)) }
|
||||
} else {
|
||||
unsafe {
|
||||
|
|
Loading…
Reference in a new issue