Skip to content

Commit

Permalink
fix: restore Context::promise_loop_poll
Browse files Browse the repository at this point in the history
  • Loading branch information
L-jasmine committed Jan 29, 2024
1 parent cb444fe commit c39f8e3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/quickjs_sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,21 @@ impl Context {
}
}

#[deprecated]
pub fn promise_loop_poll(&mut self) {
todo!()
unsafe {
let rt = self.rt();
let mut pctx: *mut JSContext = 0 as *mut JSContext;

loop {
let err = JS_ExecutePendingJob(rt, (&mut pctx) as *mut *mut JSContext);
if err <= 0 {
if err < 0 {
js_std_dump_error(pctx);
}
break;
}
}
}
}

#[deprecated]
Expand Down

0 comments on commit c39f8e3

Please sign in to comment.