[Greasemonkey] firefox weirdness (namespace conflicts?)

Godmar Back godmar at gmail.com
Thu Jul 28 15:05:19 EDT 2005

On 7/28/05, Aaron Boodman <zboogs at gmail.com> wrote:
> > Here comes the weird part.  The second extension, whose installation
> > made GM fail in this manner, has a line:
> > <script type="application/x-javascript"
> > src="chrome://communicator/content/utilityOverlay.js" />
> > in its overlay, which, when removed, allows GM to start up flawlessly.
> > I should also mention that I have stripped all initialization code
> > from the other extension, it makes no difference. I have removed the
> > Tools menu items that other extensions adds, with no improvement.
> It sounds like that extension is playing with the tools menu and not
> expecting other extensions' menu items to be in there?

No, it even happens if I comment out the XUL dealing with the menu.

> > It may be a good practice to at least wrap GM's initialization and
> > output such errors to the console, because otherwise GM will just
> > silently disappear in the face of such unexplained interactions.
> I'm confused here. You said above that it is causing an exception,
> which I presume is getting reported to the JavaScript console already.
> What else do you want it to do? If you're not getting errors in the JS
> Console you can turn them on with the
> javascript.options.showInConsole=true preference.

No, the exception is not reported; GM dies a silent death during initialization.
I know of the exception only because I debugged GM and found out
exactly where it died during it's initialization and then I wrapped
those places in the try/catch clauses I showed in my original email.

What I recommend is to wrap the initialization in browser.xul (all of
the javascript executed when the xul is loaded, and also independently
the "load" handler that's run when a new browser is opened) in a
try/catch and output errors if any to the console.

 - Godmar

More information about the Greasemonkey mailing list