mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Improve abort-on-stack-trace scriptlet
Related feedback: https://github.com/uBlockOrigin/uAssets/issues/26704#issuecomment-2569381462
This commit is contained in:
parent
551c6bc6eb
commit
b617926c1c
1 changed files with 4 additions and 2 deletions
6
src/js/resources/scriptlets.js
Normal file → Executable file
6
src/js/resources/scriptlets.js
Normal file → Executable file
|
|
@ -1174,13 +1174,15 @@ function abortOnStackTrace(
|
|||
let v = owner[chain];
|
||||
Object.defineProperty(owner, chain, {
|
||||
get: function() {
|
||||
if ( matchesStackTraceFn(needleDetails, extraArgs.log) ) {
|
||||
const log = safe.logLevel > 1 ? 'all' : 'match';
|
||||
if ( matchesStackTraceFn(needleDetails, log) ) {
|
||||
throw new ReferenceError(getExceptionToken());
|
||||
}
|
||||
return v;
|
||||
},
|
||||
set: function(a) {
|
||||
if ( matchesStackTraceFn(needleDetails, extraArgs.log) ) {
|
||||
const log = safe.logLevel > 1 ? 'all' : 'match';
|
||||
if ( matchesStackTraceFn(needleDetails, log) ) {
|
||||
throw new ReferenceError(getExceptionToken());
|
||||
}
|
||||
v = a;
|
||||
|
|
|
|||
Loading…
Reference in a new issue