fix(unstable/worker): ensure import permissions are passed (#26101)

We only had integration tests for this and not an integration test.

Closes #26074
This commit is contained in:
David Sherret 2024-10-10 14:01:42 +01:00 committed by GitHub
parent 06aadcd22b
commit 66929de3ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 47 additions and 1 deletions

View file

@ -269,7 +269,13 @@ function serializePermissions(permissions) {
if (typeof permissions == "object" && permissions != null) {
const serializedPermissions = { __proto__: null };
for (
const key of new SafeArrayIterator(["read", "write", "run", "ffi"])
const key of new SafeArrayIterator([
"read",
"write",
"run",
"ffi",
"import",
])
) {
if (ArrayIsArray(permissions[key])) {
serializedPermissions[key] = ArrayPrototypeMap(