mirror of https://github.com/gorhill/uBlock.git
Catch exceptions thrown Object.defineProperty
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/9883
Related commit:
- a9e6f9c72c
This commit is contained in:
parent
79a2678f00
commit
5dd91211ae
|
@ -932,21 +932,24 @@
|
||||||
prevSetter = odesc.set;
|
prevSetter = odesc.set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Object.defineProperty(owner, prop, {
|
try {
|
||||||
configurable,
|
Object.defineProperty(owner, prop, {
|
||||||
get() {
|
configurable,
|
||||||
if ( prevGetter !== undefined ) {
|
get() {
|
||||||
prevGetter();
|
if ( prevGetter !== undefined ) {
|
||||||
|
prevGetter();
|
||||||
|
}
|
||||||
|
return handler.getter(); // cValue
|
||||||
|
},
|
||||||
|
set(a) {
|
||||||
|
if ( prevSetter !== undefined ) {
|
||||||
|
prevSetter(a);
|
||||||
|
}
|
||||||
|
handler.setter(a);
|
||||||
}
|
}
|
||||||
return handler.getter(); // cValue
|
});
|
||||||
},
|
} catch(ex) {
|
||||||
set(a) {
|
}
|
||||||
if ( prevSetter !== undefined ) {
|
|
||||||
prevSetter(a);
|
|
||||||
}
|
|
||||||
handler.setter(a);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
const trapChain = function(owner, chain) {
|
const trapChain = function(owner, chain) {
|
||||||
const pos = chain.indexOf('.');
|
const pos = chain.indexOf('.');
|
||||||
|
|
Loading…
Reference in New Issue