mirror of https://github.com/gorhill/uBlock.git
Do not use `bind` as a way to access native calls
This commit is contained in:
parent
3c4932e1a6
commit
5244ad5baf
|
@ -60,8 +60,11 @@ function safeSelf() {
|
|||
'addEventListener': self.EventTarget.prototype.addEventListener,
|
||||
'removeEventListener': self.EventTarget.prototype.removeEventListener,
|
||||
'fetch': self.fetch,
|
||||
'JSON_parse': self.JSON.parse.bind(self.JSON),
|
||||
'JSON_stringify': self.JSON.stringify.bind(self.JSON),
|
||||
'JSON': self.JSON,
|
||||
'JSON_parseFn': self.JSON.parse,
|
||||
'JSON_stringifyFn': self.JSON.stringify,
|
||||
'JSON_parse': (...args) => safe.JSON_parseFn.call(safe.JSON, ...args),
|
||||
'JSON_stringify': (...args) => safe.JSON_stringifyFn.call(safe.JSON, ...args),
|
||||
'log': console.log.bind(console),
|
||||
uboLog(...args) {
|
||||
if ( scriptletGlobals.has('canDebug') === false ) { return; }
|
||||
|
|
Loading…
Reference in New Issue