Skip to content

Commit

Permalink
Remove unnecessary UnwindSafe restriction for N-API backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
dherman committed Jul 14, 2020
1 parent 93e564d commit ef349bb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/context/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ use std::boxed::Box;
use std::cell::Cell;
use std::mem::MaybeUninit;
use std::os::raw::c_void;
use std::panic::UnwindSafe;
#[cfg(feature = "legacy-runtime")]
use std::panic::{AssertUnwindSafe, catch_unwind, resume_unwind};
use std::panic::{AssertUnwindSafe, UnwindSafe, catch_unwind, resume_unwind};
use neon_runtime;
use neon_runtime::raw;
use neon_runtime::scope::Root;
Expand Down Expand Up @@ -172,7 +171,7 @@ pub trait ContextInternal<'a>: Sized {

#[cfg(feature = "napi-runtime")]
fn try_catch_internal<'b: 'a, F>(&mut self, f: F) -> Result<Handle<'a, JsValue>, Handle<'a, JsValue>>
where F: UnwindSafe + FnOnce(&mut Self) -> JsResult<'b, JsValue>
where F: FnOnce(&mut Self) -> JsResult<'b, JsValue>
{
let result = f(self);
let mut local: MaybeUninit<raw::Local> = MaybeUninit::zeroed();
Expand Down

0 comments on commit ef349bb

Please sign in to comment.