Closed Bug 1175877 Opened 6 years ago Closed 6 years ago
Script error: chrome://browser/content/downloads/downloads .js, line 67: Type Error: "Cu" is read-only
Still haven't worked out when exactly this happens, but I've been seeing it a lot and it's been annoying me. Presumably it might also actually be breaking something.
we are likely trying to overwrite global consts, should be harmless, apart from the error. I actually thought this was due to the confusing situation of these consts in browser (bug 406371), but then I've checked placesOverlay.xul and looks like it doesn't use anymore consts from some time, exactly to avoid these errors. Thus looks like something else might be defining those const at a global level, but I couldn't find who... is this without add-ons?
STR: Right-click any page and select "View Page Info"
we should probably just change that const to a let.
Comment on attachment 8658161 [details] [diff] [review] Changed Cu from const to let in pageInfo.js Looks simple enough. Thanks for the fix! I assume you tested manually that this fixes the error message.
Attachment #8658161 - Flags: review?(paolo.mozmail) → review+
Sorry but I wasn't able to reproduce it in the first place. I'm not getting the error message.
well, the change is very simple and we can tell it is the right change for the issue, based on the error. My only doubt is whether we should use var here, since it's in the global scope per bug 1202902. Just in case, if you could do that, I'd say we should just checkin-needed the updated patch (I don't think it's worth to waste Try server resources on this simple change)
Nikhil Gupta, would you mind making a small change to your patch? Since the only reason to define Cu here is for a couple of Cu.import, would you mind changing those to Components.utils.import and completely remove the Cu definition from the file? I think in the end it'd be better.
Hello, in the future, please remember to add the bug number to the commit and if possible put r=reviewname.
You need to log in before you can comment on or make changes to this bug.