<Function>.prototype should not be DontEnum

RESOLVED FIXED in 1.6R6

Status

RESOLVED FIXED
13 years ago
12 years ago

People

(Reporter: Christian.Birkl, Unassigned)

Tracking

other
1.6R6
x86
Windows XP

Details

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Build Identifier: 

Currently (1.6R2) ECMA test case "GlobalObjects", "15.1.2.1-1.js" failes.

Reproducible: Always

Steps to Reproduce:
1. Execute ECMA test "GlobalObjects", "15.1.2.1-1.js"

Actual Results:  
PROPS = ""

Expected Results:  
PROPS = "prototype"

As of ECMA spec 15.3.5.2 an instance of function should have property propertype marked as DontDelete. Rhino currently initialises it with:

attr = (isPrototypePropertyImmune) ? DONTENUM | READONLY | PERMANENT : DONTENUM;

Which - in any case - results in DONTENUM. A wild guess (which actually makes the test pass) is to change this line to:

attr = (isPrototypePropertyImmune) ? DONTENUM | READONLY | PERMANENT : PERMANENT;

But I'm not sure if "isPrototypePropertyImmune" means "this object is not _the_ Function object but _a_ Function object".

Comment 1

12 years ago
Hm... I believe the correct solution is

attr = isPrototypePropertyImmune ? READONLY | PERMANENT : PERMANENT;

I fixed this in CVS HEAD.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Comment 2

12 years ago
Adding target milestone of 1.6R6 based on the date this bug was resolved FIXED.
Target Milestone: --- → 1.6R6
You need to log in before you can comment on or make changes to this bug.