summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml6
-rw-r--r--cli/tests/integration/run_tests.rs90
-rw-r--r--cli/tests/testdata/unstable_ffi_1.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_1.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_10.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_10.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_11.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_11.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_12.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_12.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_13.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_13.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_14.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_14.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_15.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_15.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_2.js10
-rw-r--r--cli/tests/testdata/unstable_ffi_2.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_3.js10
-rw-r--r--cli/tests/testdata/unstable_ffi_3.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_4.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_4.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_5.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_5.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_6.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_6.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_7.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_7.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_8.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_8.js.out1
-rw-r--r--cli/tests/testdata/unstable_ffi_9.js1
-rw-r--r--cli/tests/testdata/unstable_ffi_9.js.out1
-rw-r--r--cli/tests/unit/ffi_test.ts51
-rw-r--r--ext/ffi/lib.rs62
34 files changed, 249 insertions, 8 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d0c6a0030..113ee4db0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -236,7 +236,7 @@ jobs:
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
- key: 4-cargo-home-${{ matrix.os }}-${{ hashFiles('Cargo.lock') }}
+ key: 5-cargo-home-${{ matrix.os }}-${{ hashFiles('Cargo.lock') }}
# In main branch, always creates fresh cache
- name: Cache build output (main)
@@ -252,7 +252,7 @@ jobs:
!./target/*/*.zip
!./target/*/*.tar.gz
key: |
- 4-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ github.sha }}
+ 5-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ github.sha }}
# Restore cache from the latest 'main' branch build.
- name: Cache build output (PR)
@@ -268,7 +268,7 @@ jobs:
!./target/*/*.tar.gz
key: never_saved
restore-keys: |
- 4-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-
+ 5-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-
# Don't save cache after building PRs or branches other than 'main'.
- name: Skip save cache (PR)
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index c789a3389..fb6f72c6e 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -2523,3 +2523,93 @@ itest!(fetch_async_error_stack {
output: "fetch_async_error_stack.ts.out",
exit_code: 1,
});
+
+itest!(unstable_ffi_1 {
+ args: "run unstable_ffi_1.js",
+ output: "unstable_ffi_1.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_2 {
+ args: "run unstable_ffi_2.js",
+ output: "unstable_ffi_2.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_3 {
+ args: "run unstable_ffi_3.js",
+ output: "unstable_ffi_3.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_4 {
+ args: "run unstable_ffi_4.js",
+ output: "unstable_ffi_4.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_5 {
+ args: "run unstable_ffi_5.js",
+ output: "unstable_ffi_5.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_6 {
+ args: "run unstable_ffi_6.js",
+ output: "unstable_ffi_6.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_7 {
+ args: "run unstable_ffi_7.js",
+ output: "unstable_ffi_7.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_8 {
+ args: "run unstable_ffi_8.js",
+ output: "unstable_ffi_8.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_9 {
+ args: "run unstable_ffi_9.js",
+ output: "unstable_ffi_9.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_10 {
+ args: "run unstable_ffi_10.js",
+ output: "unstable_ffi_10.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_11 {
+ args: "run unstable_ffi_11.js",
+ output: "unstable_ffi_11.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_12 {
+ args: "run unstable_ffi_12.js",
+ output: "unstable_ffi_12.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_13 {
+ args: "run unstable_ffi_13.js",
+ output: "unstable_ffi_13.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_14 {
+ args: "run unstable_ffi_14.js",
+ output: "unstable_ffi_14.js.out",
+ exit_code: 70,
+});
+
+itest!(unstable_ffi_15 {
+ args: "run unstable_ffi_15.js",
+ output: "unstable_ffi_15.js.out",
+ exit_code: 70,
+});
diff --git a/cli/tests/testdata/unstable_ffi_1.js b/cli/tests/testdata/unstable_ffi_1.js
new file mode 100644
index 000000000..a24a00238
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_1.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_load", { path: "", symbols: {} });
diff --git a/cli/tests/testdata/unstable_ffi_1.js.out b/cli/tests/testdata/unstable_ffi_1.js.out
new file mode 100644
index 000000000..7c564be8c
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_1.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.dlopen'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_10.js b/cli/tests/testdata/unstable_ffi_10.js
new file mode 100644
index 000000000..c7cafd3ea
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_10.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_read_i16", [0, 0]);
diff --git a/cli/tests/testdata/unstable_ffi_10.js.out b/cli/tests/testdata/unstable_ffi_10.js.out
new file mode 100644
index 000000000..bf7e1bd4f
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_10.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafePointerView#getInt16'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_11.js b/cli/tests/testdata/unstable_ffi_11.js
new file mode 100644
index 000000000..37bd75cc9
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_11.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_read_u32", [0, 0]);
diff --git a/cli/tests/testdata/unstable_ffi_11.js.out b/cli/tests/testdata/unstable_ffi_11.js.out
new file mode 100644
index 000000000..2d2d72666
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_11.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafePointerView#getUint32'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_12.js b/cli/tests/testdata/unstable_ffi_12.js
new file mode 100644
index 000000000..b05f92d39
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_12.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_read_i32", [0, 0]);
diff --git a/cli/tests/testdata/unstable_ffi_12.js.out b/cli/tests/testdata/unstable_ffi_12.js.out
new file mode 100644
index 000000000..377d8e4a5
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_12.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafePointerView#getInt32'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_13.js b/cli/tests/testdata/unstable_ffi_13.js
new file mode 100644
index 000000000..a83b8dc18
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_13.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_read_u64", [0, 0]);
diff --git a/cli/tests/testdata/unstable_ffi_13.js.out b/cli/tests/testdata/unstable_ffi_13.js.out
new file mode 100644
index 000000000..6ca67a6f2
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_13.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafePointerView#getBigUint64'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_14.js b/cli/tests/testdata/unstable_ffi_14.js
new file mode 100644
index 000000000..b39b99da5
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_14.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_read_f32", [0, 0]);
diff --git a/cli/tests/testdata/unstable_ffi_14.js.out b/cli/tests/testdata/unstable_ffi_14.js.out
new file mode 100644
index 000000000..11fcd5580
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_14.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafePointerView#getFloat32'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_15.js b/cli/tests/testdata/unstable_ffi_15.js
new file mode 100644
index 000000000..afd49b722
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_15.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_read_f64", [0, 0]);
diff --git a/cli/tests/testdata/unstable_ffi_15.js.out b/cli/tests/testdata/unstable_ffi_15.js.out
new file mode 100644
index 000000000..3015e5c91
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_15.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafePointerView#getFloat64'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_2.js b/cli/tests/testdata/unstable_ffi_2.js
new file mode 100644
index 000000000..de392fa7d
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_2.js
@@ -0,0 +1,10 @@
+Deno.core.opSync("op_ffi_call_ptr", {
+ pointer: [0, 0],
+ def: {
+ name: null,
+ parameters: [],
+ result: "void",
+ },
+ parameters: [],
+ buffers: [],
+});
diff --git a/cli/tests/testdata/unstable_ffi_2.js.out b/cli/tests/testdata/unstable_ffi_2.js.out
new file mode 100644
index 000000000..cc4cc3dc6
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_2.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafeFnPointer#call'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_3.js b/cli/tests/testdata/unstable_ffi_3.js
new file mode 100644
index 000000000..4924d9d67
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_3.js
@@ -0,0 +1,10 @@
+Deno.core.opAsync("op_ffi_call_ptr_nonblocking", {
+ pointer: [0, 0],
+ def: {
+ name: null,
+ parameters: [],
+ result: "void",
+ },
+ parameters: [],
+ buffers: [],
+});
diff --git a/cli/tests/testdata/unstable_ffi_3.js.out b/cli/tests/testdata/unstable_ffi_3.js.out
new file mode 100644
index 000000000..cc4cc3dc6
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_3.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafeFnPointer#call'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_4.js b/cli/tests/testdata/unstable_ffi_4.js
new file mode 100644
index 000000000..3e05bbf42
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_4.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_ptr_of", new Uint8Array(0));
diff --git a/cli/tests/testdata/unstable_ffi_4.js.out b/cli/tests/testdata/unstable_ffi_4.js.out
new file mode 100644
index 000000000..e0f40f2ee
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_4.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafePointer#of'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_5.js b/cli/tests/testdata/unstable_ffi_5.js
new file mode 100644
index 000000000..447ff5842
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_5.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_buf_copy_into", [[0, 0], new Uint8Array(0), 0]);
diff --git a/cli/tests/testdata/unstable_ffi_5.js.out b/cli/tests/testdata/unstable_ffi_5.js.out
new file mode 100644
index 000000000..e3db6af26
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_5.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafePointerView#copyInto'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_6.js b/cli/tests/testdata/unstable_ffi_6.js
new file mode 100644
index 000000000..cc791b8f0
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_6.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_cstr_read", [0, 0]);
diff --git a/cli/tests/testdata/unstable_ffi_6.js.out b/cli/tests/testdata/unstable_ffi_6.js.out
new file mode 100644
index 000000000..c59f51d04
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_6.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafePointerView#getCString'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_7.js b/cli/tests/testdata/unstable_ffi_7.js
new file mode 100644
index 000000000..02ef455ee
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_7.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_read_u8", [0, 0]);
diff --git a/cli/tests/testdata/unstable_ffi_7.js.out b/cli/tests/testdata/unstable_ffi_7.js.out
new file mode 100644
index 000000000..6ab413537
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_7.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafePointerView#getUint8'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_8.js b/cli/tests/testdata/unstable_ffi_8.js
new file mode 100644
index 000000000..d250c9f21
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_8.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_read_i8", [0, 0]);
diff --git a/cli/tests/testdata/unstable_ffi_8.js.out b/cli/tests/testdata/unstable_ffi_8.js.out
new file mode 100644
index 000000000..338db2631
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_8.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafePointerView#getInt8'. The --unstable flag must be provided.
diff --git a/cli/tests/testdata/unstable_ffi_9.js b/cli/tests/testdata/unstable_ffi_9.js
new file mode 100644
index 000000000..f21a4cdbf
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_9.js
@@ -0,0 +1 @@
+Deno.core.opSync("op_ffi_read_u16", [0, 0]);
diff --git a/cli/tests/testdata/unstable_ffi_9.js.out b/cli/tests/testdata/unstable_ffi_9.js.out
new file mode 100644
index 000000000..fb6d75f14
--- /dev/null
+++ b/cli/tests/testdata/unstable_ffi_9.js.out
@@ -0,0 +1 @@
+Unstable API 'Deno.UnsafePointerView#getUint16'. The --unstable flag must be provided.
diff --git a/cli/tests/unit/ffi_test.ts b/cli/tests/unit/ffi_test.ts
index b7772e8e2..22da88d27 100644
--- a/cli/tests/unit/ffi_test.ts
+++ b/cli/tests/unit/ffi_test.ts
@@ -23,3 +23,54 @@ Deno.test({ permissions: { ffi: true } }, function dlopenInvalidArguments() {
Deno.dlopen(filename);
}, TypeError);
});
+
+Deno.test({ permissions: { ffi: false } }, function ffiPermissionDenied() {
+ assertThrows(() => {
+ Deno.dlopen("/usr/lib/libc.so.6", {});
+ }, Deno.errors.PermissionDenied);
+ const ptr = new Deno.UnsafePointer(0n);
+ const fnptr = new Deno.UnsafeFnPointer(
+ ptr,
+ {
+ parameters: ["u32", "pointer"],
+ result: "void",
+ } as const,
+ );
+ assertThrows(() => {
+ fnptr.call(123, null);
+ }, Deno.errors.PermissionDenied);
+ assertThrows(() => {
+ Deno.UnsafePointer.of(new Uint8Array(0));
+ }, Deno.errors.PermissionDenied);
+ const ptrView = new Deno.UnsafePointerView(ptr);
+ assertThrows(() => {
+ ptrView.copyInto(new Uint8Array(0));
+ }, Deno.errors.PermissionDenied);
+ assertThrows(() => {
+ ptrView.getCString();
+ }, Deno.errors.PermissionDenied);
+ assertThrows(() => {
+ ptrView.getUint8();
+ }, Deno.errors.PermissionDenied);
+ assertThrows(() => {
+ ptrView.getInt8();
+ }, Deno.errors.PermissionDenied);
+ assertThrows(() => {
+ ptrView.getUint16();
+ }, Deno.errors.PermissionDenied);
+ assertThrows(() => {
+ ptrView.getInt16();
+ }, Deno.errors.PermissionDenied);
+ assertThrows(() => {
+ ptrView.getUint32();
+ }, Deno.errors.PermissionDenied);
+ assertThrows(() => {
+ ptrView.getInt32();
+ }, Deno.errors.PermissionDenied);
+ assertThrows(() => {
+ ptrView.getFloat32();
+ }, Deno.errors.PermissionDenied);
+ assertThrows(() => {
+ ptrView.getFloat64();
+ }, Deno.errors.PermissionDenied);
+});
diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs
index 6ddeee51c..01aa17698 100644
--- a/ext/ffi/lib.rs
+++ b/ext/ffi/lib.rs
@@ -45,6 +45,11 @@ fn check_unstable(state: &OpState, api_name: &str) {
}
}
+pub fn check_unstable2(state: &Rc<RefCell<OpState>>, api_name: &str) {
+ let state = state.borrow();
+ check_unstable(&state, api_name)
+}
+
pub trait FfiPermissions {
fn check(&mut self, path: Option<&Path>) -> Result<(), AnyError>;
}
@@ -144,8 +149,8 @@ pub fn init<P: FfiPermissions + 'static>(unstable: bool) -> Extension {
op_ffi_get_static::decl(),
op_ffi_call::decl(),
op_ffi_call_nonblocking::decl(),
- op_ffi_call_ptr::decl(),
- op_ffi_call_ptr_nonblocking::decl(),
+ op_ffi_call_ptr::decl::<P>(),
+ op_ffi_call_ptr_nonblocking::decl::<P>(),
op_ffi_ptr_of::decl::<P>(),
op_ffi_buf_copy_into::decl::<P>(),
op_ffi_cstr_read::decl::<P>(),
@@ -648,15 +653,38 @@ fn ffi_call(args: FfiCallArgs, symbol: &Symbol) -> Result<Value, AnyError> {
}
#[op]
-fn op_ffi_call_ptr(args: FfiCallPtrArgs) -> Result<Value, AnyError> {
+fn op_ffi_call_ptr<FP>(
+ state: &mut deno_core::OpState,
+ args: FfiCallPtrArgs,
+) -> Result<Value, AnyError>
+where
+ FP: FfiPermissions + 'static,
+{
+ check_unstable(state, "Deno.UnsafeFnPointer#call");
+
+ let permissions = state.borrow_mut::<FP>();
+ permissions.check(None)?;
+
let symbol = args.get_symbol();
ffi_call(args.into(), &symbol)
}
#[op]
-async fn op_ffi_call_ptr_nonblocking(
+async fn op_ffi_call_ptr_nonblocking<FP>(
+ state: Rc<RefCell<deno_core::OpState>>,
args: FfiCallPtrArgs,
-) -> Result<Value, AnyError> {
+) -> Result<Value, AnyError>
+where
+ FP: FfiPermissions + 'static,
+{
+ check_unstable2(&state, "Deno.UnsafeFnPointer#call");
+
+ {
+ let mut state = state.borrow_mut();
+ let permissions = state.borrow_mut::<FP>();
+ permissions.check(None)?;
+ }
+
let symbol = args.get_symbol();
tokio::task::spawn_blocking(move || ffi_call(args.into(), &symbol))
.await
@@ -774,6 +802,8 @@ fn op_ffi_ptr_of<FP>(
where
FP: FfiPermissions + 'static,
{
+ check_unstable(state, "Deno.UnsafePointer#of");
+
let permissions = state.borrow_mut::<FP>();
permissions.check(None)?;
@@ -788,6 +818,8 @@ fn op_ffi_buf_copy_into<FP>(
where
FP: FfiPermissions + 'static,
{
+ check_unstable(state, "Deno.UnsafePointerView#copyInto");
+
let permissions = state.borrow_mut::<FP>();
permissions.check(None)?;
@@ -810,6 +842,8 @@ fn op_ffi_cstr_read<FP>(
where
FP: FfiPermissions + 'static,
{
+ check_unstable(state, "Deno.UnsafePointerView#getCString");
+
let permissions = state.borrow_mut::<FP>();
permissions.check(None)?;
@@ -825,6 +859,8 @@ fn op_ffi_read_u8<FP>(
where
FP: FfiPermissions + 'static,
{
+ check_unstable(state, "Deno.UnsafePointerView#getUint8");
+
let permissions = state.borrow_mut::<FP>();
permissions.check(None)?;
@@ -839,6 +875,8 @@ fn op_ffi_read_i8<FP>(
where
FP: FfiPermissions + 'static,
{
+ check_unstable(state, "Deno.UnsafePointerView#getInt8");
+
let permissions = state.borrow_mut::<FP>();
permissions.check(None)?;
@@ -853,6 +891,8 @@ fn op_ffi_read_u16<FP>(
where
FP: FfiPermissions + 'static,
{
+ check_unstable(state, "Deno.UnsafePointerView#getUint16");
+
let permissions = state.borrow_mut::<FP>();
permissions.check(None)?;
@@ -867,6 +907,8 @@ fn op_ffi_read_i16<FP>(
where
FP: FfiPermissions + 'static,
{
+ check_unstable(state, "Deno.UnsafePointerView#getInt16");
+
let permissions = state.borrow_mut::<FP>();
permissions.check(None)?;
@@ -881,6 +923,8 @@ fn op_ffi_read_u32<FP>(
where
FP: FfiPermissions + 'static,
{
+ check_unstable(state, "Deno.UnsafePointerView#getUint32");
+
let permissions = state.borrow_mut::<FP>();
permissions.check(None)?;
@@ -895,6 +939,8 @@ fn op_ffi_read_i32<FP>(
where
FP: FfiPermissions + 'static,
{
+ check_unstable(state, "Deno.UnsafePointerView#getInt32");
+
let permissions = state.borrow_mut::<FP>();
permissions.check(None)?;
@@ -909,6 +955,8 @@ fn op_ffi_read_u64<FP>(
where
FP: FfiPermissions + 'static,
{
+ check_unstable(state, "Deno.UnsafePointerView#getBigUint64");
+
let permissions = state.borrow_mut::<FP>();
permissions.check(None)?;
@@ -925,6 +973,8 @@ fn op_ffi_read_f32<FP>(
where
FP: FfiPermissions + 'static,
{
+ check_unstable(state, "Deno.UnsafePointerView#getFloat32");
+
let permissions = state.borrow_mut::<FP>();
permissions.check(None)?;
@@ -939,6 +989,8 @@ fn op_ffi_read_f64<FP>(
where
FP: FfiPermissions + 'static,
{
+ check_unstable(state, "Deno.UnsafePointerView#getFloat64");
+
let permissions = state.borrow_mut::<FP>();
permissions.check(None)?;