mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-12-26 00:59:28 -05:00
InIsolate for PromiseRejectMessage (#172)
This commit is contained in:
parent
64136e684e
commit
4ffbb7a00b
1 changed files with 9 additions and 0 deletions
|
@ -1,8 +1,11 @@
|
|||
use std::marker::PhantomData;
|
||||
|
||||
use crate::callback_scope::GetIsolate;
|
||||
use crate::support::MaybeBool;
|
||||
use crate::Context;
|
||||
use crate::Function;
|
||||
use crate::InIsolate;
|
||||
use crate::Isolate;
|
||||
use crate::Local;
|
||||
use crate::Promise;
|
||||
use crate::PromiseResolver;
|
||||
|
@ -196,6 +199,12 @@ pub enum PromiseRejectEvent {
|
|||
#[repr(C)]
|
||||
pub struct PromiseRejectMessage<'msg>([usize; 3], PhantomData<&'msg ()>);
|
||||
|
||||
impl<'msg> InIsolate for PromiseRejectMessage<'msg> {
|
||||
fn isolate(&mut self) -> &mut Isolate {
|
||||
self.get_isolate()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'msg> PromiseRejectMessage<'msg> {
|
||||
pub fn get_promise(&self) -> Local<'msg, Promise> {
|
||||
unsafe {
|
||||
|
|
Loading…
Reference in a new issue