[patch][noscript-v5] Fix "Illegal AddressMatcher" error

Ask for help about NoScript, no registration needed to post
Guest

[patch][noscript-v5] Fix "Illegal AddressMatcher" error

Post by Guest »

After update to noscript v5.1.6, I noticed messages like this:

Code: Select all

Illegal AddressMatcher: [xpconnect wrapped nsIPrefBranch] -- TypeError: s.split is not a function
Illegal AddressMatcher: [xpconnect wrapped nsIPrefBranch] -- TypeError: s.split is not a function
in logs. Trivial patch below:

Code: Select all

--- {73a6fe31-595d-460b-a920-fcc0f8843232}-5.1.7/chrome/content/noscript/DoNotTrack.js.orig	2017-11-17 14:07:18.000000000 +0300
+++ {73a6fe31-595d-460b-a920-fcc0f8843232}-5.1.7/chrome/content/noscript/DoNotTrack.js	2017-12-01 20:28:31.000000000 +0300
@@ -18,7 +18,7 @@
        break;
       case "exceptions":
       case "forced":
-        this[name] = AddressMatcher.create(prefs, COMPAT.getStringPref(prefs, name));
+        this[name] = AddressMatcher.create(COMPAT.getStringPref(prefs, name));
       break;
     }
   },
(It seems this bug is not present in v10 branch, as (obsolete?) DoNotTrack code was removed)
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:52.0) Gecko/20100101 Firefox/52.0