diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-07-18 22:32:11 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2020-07-19 01:47:45 +0200 |
commit | faa64edaf409757549a7df85812f6ea4f368051c (patch) | |
tree | 4be5cd868f3d49c5ea928b45bf46cf9c10f64fae /core/errors.rs | |
parent | aebea6bd24dc1788c6db2f58204177af1c5d2dd6 (diff) |
Upgrade to rusty_v8 0.7.0 (#6801)
Diffstat (limited to 'core/errors.rs')
-rw-r--r-- | core/errors.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/errors.rs b/core/errors.rs index 27c08fac5..218d7c619 100644 --- a/core/errors.rs +++ b/core/errors.rs @@ -378,12 +378,15 @@ impl ErrWithV8Handle { err: ErrBox, handle: v8::Local<v8::Value>, ) -> Self { - let handle = v8::Global::new_from(scope, handle); + let handle = v8::Global::new(scope, handle); Self { err, handle } } - pub fn get_handle(&self) -> &v8::Global<v8::Value> { - &self.handle + pub fn get_handle<'s>( + &self, + scope: &mut v8::HandleScope<'s>, + ) -> v8::Local<'s, v8::Value> { + v8::Local::new(scope, &self.handle) } } |