Page 1 of 1

SyntaxChecker sandbox needs JS_VERSION

Posted: Sat Dec 10, 2011 2:30 pm
by al_9x

Code: Select all

return Cu.evalInSandbox(s, this.sandbox);

Re: SyntaxChecker sandbox needs JS_VERSION

Posted: Sat Dec 10, 2011 2:36 pm
by Giorgio Maone
Yes it does...

Re: SyntaxChecker sandbox needs JS_VERSION

Posted: Sun Dec 11, 2011 10:44 pm
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}")

Re: SyntaxChecker sandbox needs JS_VERSION

Posted: Sun Dec 11, 2011 11:16 pm
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

Re: SyntaxChecker sandbox needs JS_VERSION

Posted: Sun Dec 11, 2011 11:28 pm
by Giorgio Maone
Does 1.85 work?

Re: SyntaxChecker sandbox needs JS_VERSION

Posted: Sun Dec 11, 2011 11:57 pm
by al_9x
Giorgio Maone wrote:Does 1.85 work?
No, only "1.8." Did you find that 1.8 was inadequate, how?

Re: SyntaxChecker sandbox needs JS_VERSION

Posted: Tue Dec 13, 2011 11:50 am
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).

Re: SyntaxChecker sandbox needs JS_VERSION

Posted: Tue Dec 13, 2011 4:28 pm
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

Re: SyntaxChecker sandbox needs JS_VERSION

Posted: Tue Dec 13, 2011 10:24 pm
by Giorgio Maone
OK, restored 1.8 in latest development build 2.2.4rc3.