From 9c5928b5aa3716f7441694da24982cecacb7a061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 17 Apr 2022 17:47:24 +0200 Subject: 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". --- cli/tests/testdata/test/recursive_permissions_pledge.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 cli/tests/testdata/test/recursive_permissions_pledge.js (limited to 'cli/tests/testdata/test') diff --git a/cli/tests/testdata/test/recursive_permissions_pledge.js b/cli/tests/testdata/test/recursive_permissions_pledge.js new file mode 100644 index 000000000..dcdcbf574 --- /dev/null +++ b/cli/tests/testdata/test/recursive_permissions_pledge.js @@ -0,0 +1,8 @@ +Deno.core.opSync( + "op_pledge_test_permissions", + "none", +); +Deno.core.opSync( + "op_pledge_test_permissions", + "inherit", +); -- cgit v1.2.3