diegocr / PrefMon

Track your Firefox's (about:config) preferences for unwanted changes.
9 stars 1 forks source link

error?: unmatched ) in bootstrap.js line 286 #5

Closed grumpygeek closed 10 years ago

grumpygeek commented 10 years ago

I'm getting a persistent and frequent error in the browser error console referring to line 286 in boostrap.js. That line is indicated below (copied the whole function for reference). I don't see any problem with it myself, but seeing the error so frequently I thought I would report it and let you make the call. It could be this Mozilla-based browser is misreporting it.

    u: function(k,v,j) {
        this.prefs[k] = v;
        let l = !j && this.prefs[TP[0]];
        if(l) try {
            if(new RegExp(l,'i').test(k)) {       /* <----  this line */

                let p = this.prefs[TP[4]],
                    o = p && JSON.parse(p) || {};
                o[k] = v;
                this.s(TP[4],this.prefs[TP[4]] = JSON.stringify(o));
            }
        } catch(e) {
            Cu.reportError(e);
        }
    },

And this is the error reported: Timestamp: 9/12/2014 5:01:41 PM Error: unmatched ) in regular expression Source File: resource://gre/modules/XPIProvider.jsm -> jar:file:///C:/Users/[me]/AppData/Roaming/[path to profile folder]/extensions/%7B517f9e52-c795-4764-bf77-5e2db596cee6%7D.xpi!/bootstrap.js Line: 286

Similar but less frequent report also for line 608 which looks similar to me. Sorry to bother you if this is not a real error in the code.

diegocr commented 10 years ago

Actually the problem is with your Revert Changes On option, basically the pattern you've configured there is what has the issue with an unmatched ")"

grumpygeek commented 10 years ago

Thank you. I would not have made that connection from the error message. That auto revert setting is not important to me (I have it set to ask) so I have cleared the whole revert string for now. If I reinstall PrefMon, I'll be more careful about those pipe symbols in parentheses versus not in parentheses. Sorry to bother you but the help is appreciated.

diegocr commented 10 years ago

I've just committed a patch to provide slightly better error messages, there's still room for improvement, though.