0c0w3/troubleshooter — pull request #1 by gavinsharp (2012-11-22 01:28:54+00:00)
Title: a few tweaks

I haven't tested this at all, I may have made a dumb mistake :)

One other thought I had: rather than comparing URI origins with a string compare, it would be more robust to compare nsIPrincipals (creating one for the whitelisted URL using getNoAppCodebasePrincipal, and comparing with the window.document.nodePrincipal of the windows being created using the relevant nsIPrincipal API). But getNoAppCodebasePrincipal changed recently, so you'd need to jump through some hoops to keep Firefox 10 compat), and maybe that's not worth it.