1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-26 17:19:06 -05:00
denoland-deno/cli/tests/testdata/bench/recursive_permissions_pledge.js
Bartek Iwańczuk 9c5928b5aa
fix: panic when trying to pledge permissions before restoring previous pledge (#14306)
This commit fixes and edge case, where testing/benching code could pledge new
permission set before restoring the previous pledge.

Appropriate panics were added and tests that assert that process is killed
in case of "recursive pledge".
2022-04-17 17:47:24 +02:00

8 lines
129 B
JavaScript

Deno.core.opSync(
"op_pledge_test_permissions",
"none",
);
Deno.core.opSync(
"op_pledge_test_permissions",
"inherit",
);