Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Redeclaration of const document when closing sidebar #1226

Ventero opened this Issue · 4 comments

3 participants


uncaught exception: "redeclaration of const document" in components/greasemonkey.js, line 302

Steps to reproduce:
1. Open a page and let Greasemonkey inject some scripts
2. Open a sidebar (for example your history or bookmarks)
3. Close that sidebar again

Build identifier:Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101027 Firefox/3.6.12
Couldn't reproduce this with FF4 nightly.


If the document variable is const then we can't overwrite it with a local variable. Since this only effects pre-Firefox 4 and that code is for Firefox 4, we could just use the local variable trick in Firefox 4 and leave older version of Firefox the way they are.


I have seen this, I think on Linux, but am currently not seeing it at HEAD, on Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20101026 Firefox/3.6.12


Yep bug confirmed on Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100625 Firefox/3.6.6 w/ GM nightly 2010-11-21, still not on Windows. Therefore de-prioritizing to 0.9.1.


I'm seeing a different error now:

Error: uncaught exception: [Exception... "Illegal value" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: file:///.../extensions/%7Be4a8a97b-f2ed-450b-b12d-ee082ba24781%7D/components/greasemonkey.js :: anonymous :: line 306" data: no]

But it goes away with the fix for #1298 applied, so closing this issue.

@arantius arantius closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.