Comment #8 on issue 1547 by [email protected]: Wrong global in cross-frame this-coercion
http://code.google.com/p/v8/issues/detail?id=1547

ES5 wants oooouuuu. Picking i instead of o for the non-Reference-callee is a form of dynamic scope and a capability leak hazard.

There's no a-priori "most consistent" definition, in my opinion, just ES5's a-priori and safer semantics, and the a-posteriori backward compatbiility de-facto standard, which wants ioiouuuu. IE8 says ioioioio of course, IE9 says ioioioio due to lack of strict mode support, and I believe IE10pp says ioiouuuu.

Calling a function via a property reference (which is what global vars bind) is different from calling via another kind of expression, in JS from 1995 on.

ES5 strict mode in the caller fixes this historical wart, but for ES.next (drafting right now) we want to specify both multiple globals and the non-strict "ES5+reality" dialect's semantics.

/be

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to