SyntaxChecker sandbox needs JS_VERSION

Bug reports and enhancement requests
Post Reply
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

SyntaxChecker sandbox needs JS_VERSION

Post by al_9x »

Code: Select all

return Cu.evalInSandbox(s, this.sandbox);
Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20100101 Firefox/9.0
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: SyntaxChecker sandbox needs JS_VERSION

Post by Giorgio Maone »

Yes it does...
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: SyntaxChecker sandbox needs JS_VERSION

Post by al_9x »

NS 2.2.4rc2
  1. ScriptSurrogate.js:9 - JS_VERSION is unqualified
  2. with the above fixed, surrogates still don't seem to be running at all with ECMAv5, "1.8" works.
  3. ScriptSurrogate.js:99 - would be helpful for syntax error log to mention the source ("Error parsing {name} surrogate: {error}")
Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20100101 Firefox/9.0
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: SyntaxChecker sandbox needs JS_VERSION

Post by al_9x »

al_9x wrote:with the above fixed, surrogates still don't seem to be running at all with ECMAv5
with ECMAv5, @* surrogate runs for frames but not top level windows
Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20100101 Firefox/9.0
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: SyntaxChecker sandbox needs JS_VERSION

Post by Giorgio Maone »

Does 1.85 work?
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: SyntaxChecker sandbox needs JS_VERSION

Post by al_9x »

Giorgio Maone wrote:Does 1.85 work?
No, only "1.8." Did you find that 1.8 was inadequate, how?
Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20100101 Firefox/9.0
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: SyntaxChecker sandbox needs JS_VERSION

Post by Giorgio Maone »

al_9x wrote:
Giorgio Maone wrote:Does 1.85 work?
No, only "1.8." Did you find that 1.8 was inadequate, how?
Looking at the Mozilla source code, I found the highest supported version has an identifier string of "1.85", while "ECMAv5" is a sort of alias for "latest version".
I was hoping to make Surrogate more future proof by using either, but I guess I need to settle with 1.8.

On a side note, I strongly suspect this problem affects only users (like you) who have noscript.surrogate.sandbox set to false (i.e. those are not valid version identifiers for the <script> element).
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: SyntaxChecker sandbox needs JS_VERSION

Post by al_9x »

Giorgio Maone wrote:On a side note, I strongly suspect this problem affects only users (like you) who have noscript.surrogate.sandbox set to false (i.e. those are not valid version identifiers for the <script> element).
I have sandbox=true in my main profile and besides always confirm in a clean profile, however I don't think sandbox matters here. This is the clause that affects @ surrogates (right?), for top level windows it chooses this.execute, regardless of sandbox.

Code: Select all

scriptURL === pageURL ? let (win = document.defaultView) win != win.top ? this.executeSandbox : this.execute
Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20100101 Firefox/9.0
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: SyntaxChecker sandbox needs JS_VERSION

Post by Giorgio Maone »

OK, restored 1.8 in latest development build 2.2.4rc3.
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
Post Reply