1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

signal APIs should require --unstable (#4926)

This commit is contained in:
Ryan Dahl 2020-04-27 13:38:23 -04:00 committed by GitHub
parent 7a94ea08e9
commit 62976a1c94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,10 +40,11 @@ struct SignalArgs {
#[cfg(unix)]
fn op_signal_bind(
isolate: &mut CoreIsolate,
_state: &State,
state: &State,
args: Value,
_zero_copy: Option<ZeroCopyBuf>,
) -> Result<JsonOp, OpError> {
state.check_unstable("Deno.signal");
let args: BindSignalArgs = serde_json::from_value(args)?;
let mut resource_table = isolate.resource_table.borrow_mut();
let rid = resource_table.add(
@ -61,10 +62,11 @@ fn op_signal_bind(
#[cfg(unix)]
fn op_signal_poll(
isolate: &mut CoreIsolate,
_state: &State,
state: &State,
args: Value,
_zero_copy: Option<ZeroCopyBuf>,
) -> Result<JsonOp, OpError> {
state.check_unstable("Deno.signal");
let args: SignalArgs = serde_json::from_value(args)?;
let rid = args.rid as u32;
let resource_table = isolate.resource_table.clone();
@ -87,10 +89,11 @@ fn op_signal_poll(
#[cfg(unix)]
pub fn op_signal_unbind(
isolate: &mut CoreIsolate,
_state: &State,
state: &State,
args: Value,
_zero_copy: Option<ZeroCopyBuf>,
) -> Result<JsonOp, OpError> {
state.check_unstable("Deno.signal");
let args: SignalArgs = serde_json::from_value(args)?;
let rid = args.rid as u32;
let mut resource_table = isolate.resource_table.borrow_mut();