Error Console "Evaluate" broken by NoScript?

Bug reports and enhancement requests
Post Reply
mjwilson
Posts: 3
Joined: Thu Sep 02, 2010 7:53 am

Error Console "Evaluate" broken by NoScript?

Post 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]
Mozilla/5.0 (Windows NT 5.1; rv:2.0b4) Gecko/20100818 Firefox/4.0b4
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Error Console "Evaluate" broken by NoScript?

Post 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)) })
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.12) Gecko/20100825 SeaMonkey/2.0.7
mjwilson
Posts: 3
Joined: Thu Sep 02, 2010 7:53 am

Re: Error Console "Evaluate" broken by NoScript?

Post by mjwilson »

I'm just using

Code: Select all

123
in the Error Console as an example.

This works OK with NoScript disabled or on a clean profile, and fails with NoScript enabled.
Mozilla/5.0 (Windows NT 5.1; rv:2.0b4) Gecko/20100818 Firefox/4.0b4
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Error Console "Evaluate" broken by NoScript?

Post 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
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.12) Gecko/20100825 SeaMonkey/2.0.7
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Error Console "Evaluate" broken by NoScript?

Post 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.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
mjwilson
Posts: 3
Joined: Thu Sep 02, 2010 7:53 am

Re: Error Console "Evaluate" broken by NoScript?

Post by mjwilson »

Thanks.
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 (.NET CLR 3.5.30729)
Post Reply