[Webkit-unassigned] [Bug 64250] Global strict mode function leaking global object as "this".

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 13 16:24:25 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=64250





--- Comment #6 from Brendan Eich <brendan at mozilla.org>  2011-07-13 16:24:26 PST ---
(In reply to comment #5)
> (In reply to comment #2)
> > http://code.google.com/p/v8/issues/detail?id=1547 has a testcase in comment 6, correct ES5 output is "oooouuuu", Firefox does "ioiouuuu" for backward compat (but we would like to break that in a coordinated move by browser vendors, with site evangelism as needed).
> > 
> > /be
> 
> Hey Brendan,
> 
> Thanks for the test case.  Just to confirm, the text in the test case seems to be incorrect in stating the expected result to be "iooouuuu", whereas my understanding agrees with your comment that the correct result should be "oooouuuu".

ES5 wants oooouuuu.

Mark, upon hearing the full horror of the web compatibility constraint, wants iooouuuu (he wrote the test, I extended it to test the strict callee g). This is something Mark wants to allow strict callers to protect themselves from leaking the capability to their global object to non-strict callees.

Firefox and IE do ioio.... (IE, even IE10pp, still does not handle strict mode correctly, so gives ioio for .... -- Firefox gives uuuu).

For SpiderMonkey in Firefox, we avoided an extra test for strict caller and wound up with ioiouuuu. We could add the test to avoid the capability leak, but I just today expressed to mark my hope that we can all switch to oooouuuu without breaking the web (maybe with a bit of site evangelism).

> I've expanded the test to cover 'with' behaviour.  I'd expected that the correct this value to be passed in all cases of with statements should be the base object that the property is being accessed off, but looking at the spec (and Safari/FireFox behaviour!) this is incorrect, since the definition for the comma operator causes GetValue to be called on the reference.  It would be great to get confirmation that my understanding here is correct!

You are correct.

> WRT to coordinating releases, that would be great.  I'll probably fix this in ToT soon so we can start the bug finding /evangelism process.  I think you guys have plans on a faster release cycle than we do right now - any idea when you'd expect to see this change in a release Firefox?


Firefox 8, so since we shipped 5 and we ship every quarter, < 3 quarters from now -- early next year.

Question is how many sites will test with our nightly, aurora (think a for alpha) and beta channels, which pipeline-stage every six weeks. But if we get you and V8 to do oooouuuu as well, then *maybe*. The IE share is the worry.

/be

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list