deno
4294be52 - fix(canvas): require FFI permission for native window handles (#36080)

Commit
128 days ago
fix(canvas): require FFI permission for native window handles (#36080) ## What - Check FFI permission before initializing a native window surface. - Keep `Deno.serve`'s native request handle private by removing an unused accessor. - Add regressions for the permission behavior and request-wrapper shape. ## Why `UnsafeWindowSurface` consumes raw native handles represented by FFI pointer values, but it relied on pointer-creation paths to enforce permission. Checking at the consumer makes every construction path follow the same permission contract and avoids starting graphics initialization for denied calls. The request accessor was unused and unnecessarily made native request state part of the wrapper's observable shape. ## Impact Construction without FFI access now throws `NotCapable`. Existing construction with FFI access remains unchanged. ## Checks - `./tools/format.js` - `cargo check -p deno_canvas` - `cargo test -p unit_tests --test unit -- serve_test` - `cargo test -p unit_tests --test unit -- webgpu_test`
Author
Parents
Loading