feat: permission stack traces in ops (#26938)

This commit improves permission prompts by adding an option
to print a full trace of where the permissions is being requested.

Due to big performance hint of stack trace collection, this is only
enabled when `DENO_TRACE_PERMISSIONS` env var is present.

Closes https://github.com/denoland/deno/issues/20756

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Leo Kettmeir 2024-11-20 13:24:04 -08:00 committed by GitHub
parent 8f72798622
commit cf49599359
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 294 additions and 181 deletions

View file

@ -561,7 +561,7 @@ pub struct RegisterCallbackArgs {
result: NativeType,
}
#[op2]
#[op2(stack_trace)]
pub fn op_ffi_unsafe_callback_create<FP, 'scope>(
state: &mut OpState,
scope: &mut v8::HandleScope<'scope>,