Bug 55537
| Summary: | Functions claim to have 'callee' which they actually don't (and shouldn't) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Mark S. Miller <erights> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | barraclough, erights |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
Mark S. Miller
> 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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Gavin Barraclough
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.
Gavin Barraclough
Fixed in r88315