Bug 55537

Summary: Functions claim to have 'callee' which they actually don't (and shouldn't)
Product: WebKit Reporter: Mark S. Miller <erights>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: barraclough, erights
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Description Mark S. Miller 2011-03-01 17:42:10 PST
> function foo(){"use strict"}

> Object.getOwnPropertyNames(foo)
["arguments", "callee", "caller", "length", "name", "prototype"]

> Object.getOwnPropertyDescriptor(foo, 'callee')

> 'callee' in foo

> foo.hasOwnProperty('callee')

I suspect this may be due to a partial misreading of the ES5/strict poisoning rules, where we poison "callee" and "caller" on arguments, but poison "arguments" and "caller" on strict functions.
Comment 1 Gavin Barraclough 2011-06-07 18:55:22 PDT
Actually, this is a bug in all functions, not just strict ones.  Looks like a copy/paste typo.  Updating the bug name to reflect this.
Comment 2 Gavin Barraclough 2011-06-07 19:10:29 PDT
Fixed in r88315