Bug 15491
Summary: | function.prototype is undefined : ECMAScript compliance bug | ||
---|---|---|---|
Product: | WebKit | Reporter: | Garrett Smith <xk1t> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | 523.x (Safari 3) | ||
Hardware: | Mac | ||
OS: | OS X 10.4 | ||
URL: | javascript:alert( parseInt.prototype ) |
Garrett Smith
parseInt is a function.
A prototype property is automatically created for every function.
Function().prototype; //
parseInt does not have a prototype property. In order to be a Function, parseInt must have a prototype property. A function that does not have a prototype property does not conform to the Function interface; it should not be considered a function.
This applies to all built-in functions. Math.round, et c.
See also bug 14547
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Garrett Smith
ECMA 262 3rd Ed, Section 15 paragraph 9 says:-
"None of the built-in functions described in this section shall implement the
internal [[Construct]] method unless otherwise specified in the description of
a particular function. None of the built-in functions described in this section
shall initially have a prototype property unless otherwise specified in the
description of a particular function."