Avoid trapping already trapped properties

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/156#issuecomment-712249945

When the client code assigned a variable to itself, this
would cause the scriptlet to try to re-trap already
trapped properties.
This commit is contained in:
Raymond Hill 2020-10-19 12:01:55 -04:00
parent 62fd5da323
commit 2546f39568
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 0 deletions

View File

@ -808,6 +808,7 @@
return this.v;
},
setter: function(a) {
if ( a === this.v ) { return; }
this.v = a;
if ( a instanceof Object ) {
trapChain(a, chain);