Improve trusted-suppress-native-method scriptlet

Add ability to log stack trace when verbose mode is enabled.
This commit is contained in:
Raymond Hill 2024-12-12 10:18:42 -05:00
parent 42c23f10d4
commit 9b2cf0169a
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -3501,7 +3501,8 @@ function trustedSuppressNativeMethod(
}
}
if ( stackNeedle.matchAll !== true ) {
if ( matchesStackTraceFn(stackNeedle) === false ) {
const logLevel = safe.logLevel > 1 ? 'all' : '';
if ( matchesStackTraceFn(stackNeedle, logLevel) === false ) {
return context.reflect();
}
}