Bug 55537 - Functions claim to have 'callee' which they actually don't (and shouldn't)
Summary: Functions claim to have 'callee' which they actually don't (and shouldn't)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-01 17:42 PST by Mark S. Miller
Modified: 2011-06-07 19:10 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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')
undefined

> 'callee' in foo
false

> foo.hasOwnProperty('callee')
false

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