Status: New
Owner: ----

New issue 2407 by [email protected]: Object.isFrozen() throws when called on a function whose caller is strict
http://code.google.com/p/v8/issues/detail?id=2407

This code throws in Chrome and returns false in Safari and Firefox:

function nonStrict() { return Object.isFrozen(nonStrict) }
function strict() { "use strict"; return nonStrict() }
strict()

Chrome throws "TypeError: Illegal access to a strict mode caller function." All three browsers (properly) throw that error in the following case:

function nonStrict() { return nonStrict.caller }
function strict() { "use strict"; return nonStrict() }
strict()

Presumably v8 fails the first test because it uses the same machinery inside Object.isFrozen that it uses inside the "nonStrict.caller" get in the second case.

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

Reply via email to