From 2546f39568f33f63e60abb87536c48a19d9fe184 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 19 Oct 2020 12:01:55 -0400 Subject: [PATCH] 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. --- assets/resources/scriptlets.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index 78ae17cd7..7fc87fac3 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -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);