mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
Code review of scriptlet helper
This commit is contained in:
parent
2c60b331e3
commit
5287f6e029
1 changed files with 2 additions and 4 deletions
|
@ -1462,10 +1462,8 @@ function proxyApplyFn(
|
|||
}
|
||||
const fn = context[prop];
|
||||
if ( typeof fn !== 'function' ) { return; }
|
||||
const fnname = fn.name;
|
||||
const toString = (function toString() {
|
||||
return `function ${fnname}() { [native code] }`;
|
||||
}).bind(null);
|
||||
const fnStr = fn.toString();
|
||||
const toString = (function toString() { return fnStr; }).bind(null);
|
||||
if ( fn.prototype && fn.prototype.constructor === fn ) {
|
||||
context[prop] = new Proxy(fn, {
|
||||
construct: handler,
|
||||
|
|
Loading…
Reference in a new issue