Bug 15491

Summary: function.prototype is undefined : ECMAScript compliance bug
Product: WebKit Reporter: Garrett Smith <xk1t>
Component: JavaScriptCoreAssignee: 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
Reported 2007-10-13 10:36:01 PDT
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
Garrett Smith
Comment 1 2007-10-13 22:55:03 PDT
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."
Note You need to log in before you can comment on or make changes to this bug.