Page 1 of 1
Error Console "Evaluate" broken by NoScript?
Posted: Thu Sep 02, 2010 7:57 am
by mjwilson
Using Firefox 4.0b4 and NoScript 2.0.2.4rc1, I notice that the "Evalute" function in the Error Console seems to have stopped working. If I disable NoScript then it works again.
Normally, I can open Tools/Error Console, type in a Javascript expression in "Code" and select "Evaluate" to have the result of the expression on the console. But with NoScript installed I get
Code: Select all
Error: uncaught exception: [Exception... "" nsresult: "0x805e0006 (<unknown>)" location: "JS frame :: chrome://global/content/console.js :: loadOrDisplayResult :: line 85" data: no]
Re: Error Console "Evaluate" broken by NoScript?
Posted: Thu Sep 02, 2010 2:37 pm
by therube
Is it not a NoScript issue?
Start FF in -safe-mode & see if the issue doesn't persist.
Seems the Trunk is broken?
Some sample code to Evaluate:
Code: Select all
dns = Components.classes["@maone.net/noscript-service;1"].getService().wrappedJSObject.__parent__.DNS; host = "apps.facebook.com"; dns.resolve(host, false, function(r) { alert( r.entries.toSource() + "\nLocal:" + dns.isLocalHost(host)) })
Re: Error Console "Evaluate" broken by NoScript?
Posted: Thu Sep 02, 2010 3:00 pm
by mjwilson
I'm just using
in the Error Console as an example.
This works OK with NoScript disabled or on a clean profile, and fails with NoScript enabled.
Re: Error Console "Evaluate" broken by NoScript?
Posted: Thu Sep 02, 2010 3:12 pm
by therube
OK, so 123 is working.
(And so it was just the particular code that I posted that was failing.)
> or on a clean profile
Is this a clean profile with NoScript installed (at which point no longer clean

.)
Running like that, NoScript enabled, 123 evaluates as expected for me (to 123).
Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100902 SeaMonkey/2.1b1pre
Re: Error Console "Evaluate" broken by NoScript?
Posted: Thu Sep 02, 2010 3:17 pm
by Giorgio Maone
It seems a change in how frame origins are computed in recent Minefield builds for content policy purposes.
In this case, when the console evaluated a script in its evaluation frame it used to be "seen" by content policies as a request originated by chrome://browser/console.xul, while now it looks like it is originated by about:blank (which seems a Firefox bug to me, but I'm still investigating).
The obvious work-around is allowing about:blank.
Re: Error Console "Evaluate" broken by NoScript?
Posted: Thu Sep 02, 2010 4:09 pm
by mjwilson
Thanks.