Comment #11 on issue 1547 by [email protected]: Wrong global in cross-frame this-coercion
http://code.google.com/p/v8/issues/detail?id=1547
Comment 10 seems to be based on ES5 and argues from consistency on that basis. ES5 is new and not the same as the historical de-facto and de-jure standards.
Specifically, calling a function by a global property name does in fact produce a reference with the global object as the base in ES3. That's an incomplete spec viz. global objects, but the IE and Firefox behavior completes the de-facto standard.
The good news is that JSC is nightly-testing the full ES5 semantics ("oooouuuu"), see https://bugs.webkit.org/show_bug.cgi?id=64250. This bug has an extended testcase.
We at Mozilla will do likewise in SpiderMonkey for a future Firefox release, at this point likely Firefox 8 if all goes well and we can evangelize the sites that depend on the leading 'i' behavior. See https://bugzilla.mozilla.org/show_bug.cgi?id=671947.
The reason to prefer 'o' over 'i' for remaining (non-initial) letter cases is to match ES5, and I hope that has weight with V8 maintainers. But let's not argue about this if V8 can join JSC and SpiderMonkey in attempting to switch to the full ES5 semantics.
/be -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
