Closed
Bug 299642
Opened 19 years ago
Closed 19 years ago
Javascript functions don't list their "prototype"-property in a "for ... in" statement.
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8beta3
People
(Reporter: mozilla, Assigned: brendan)
Details
(Keywords: js1.5)
Attachments
(2 files)
79 bytes,
text/plain
|
Details | |
1.70 KB,
patch
|
shaver
:
review+
brendan
:
approval1.8b3+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like Gecko) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) According to ECMAscript spec section 13.2 and 15.3.5.2 the "prototype"-property of Javascript functions is *not* "DontEnum", and should hence be visible when doing a "for .. in" of the function object. Reproducible: Always
Updated•19 years ago
|
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → 1.7 Branch
Assignee | ||
Comment 2•19 years ago
|
||
Ancient bug. If f.prototype has been used already, it will be enumerated per the spec. Any time a JSClass has a non-stub resolve hook implementation, it needs a non-stub enumerate hook impl too. /be
Assignee: general → brendan
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: js1.5
Priority: -- → P3
Target Milestone: --- → mozilla1.8beta3
Version: 1.7 Branch → Trunk
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: PC → All
Assignee | ||
Comment 3•19 years ago
|
||
Easy, no need for JSCLASS_NEW_ENUMERATE or replication of code from fun_resolve -- just trigger fun_resolve via OBJ_LOOKUP_PROPERTY. /be
Assignee | ||
Updated•19 years ago
|
Attachment #188264 -
Flags: review?(shaver)
Attachment #188264 -
Flags: approval1.8b3+
Comment on attachment 188264 [details] [diff] [review] fix And lo, it is righteous. r=shaver
Attachment #188264 -
Flags: review?(shaver) → review+
Assignee | ||
Comment 5•19 years ago
|
||
Fixed, thanks. /be
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 6•19 years ago
|
||
I failed to catch it at the time, but this appears to have caused ecma/GlobalObject/15.1.2.1-1.js ecma/GlobalObject/15.1.2.2-1.js ecma/GlobalObject/15.1.2.3-1.js ecma/GlobalObject/15.1.2.4.js ecma/GlobalObject/15.1.2.5-1.js ecma/GlobalObject/15.1.2.6.js ecma/GlobalObject/15.1.2.7.js to fail since the existing tests expected prototype to not be enumerated. Checking in 15.1.2.1-1.js; /cvsroot/mozilla/js/tests/ecma/GlobalObject/15.1.2.1-1.js,v <-- 15.1.2.1-1.js new revision: 1.5; previous revision: 1.4 done Checking in 15.1.2.2-1.js; /cvsroot/mozilla/js/tests/ecma/GlobalObject/15.1.2.2-1.js,v <-- 15.1.2.2-1.js new revision: 1.5; previous revision: 1.4 done Checking in 15.1.2.3-1.js; /cvsroot/mozilla/js/tests/ecma/GlobalObject/15.1.2.3-1.js,v <-- 15.1.2.3-1.js new revision: 1.5; previous revision: 1.4 done Checking in 15.1.2.4.js; /cvsroot/mozilla/js/tests/ecma/GlobalObject/15.1.2.4.js,v <-- 15.1.2.4.js new revision: 1.5; previous revision: 1.4 done Checking in 15.1.2.5-1.js; /cvsroot/mozilla/js/tests/ecma/GlobalObject/15.1.2.5-1.js,v <-- 15.1.2.5-1.js new revision: 1.5; previous revision: 1.4 done Checking in 15.1.2.6.js; /cvsroot/mozilla/js/tests/ecma/GlobalObject/15.1.2.6.js,v <-- 15.1.2.6.js new revision: 1.5; previous revision: 1.4 done Checking in 15.1.2.7.js; /cvsroot/mozilla/js/tests/ecma/GlobalObject/15.1.2.7.js,v <-- 15.1.2.7.js new revision: 1.5; previous revision: 1.4 done
Comment 7•19 years ago
|
||
Checking in 10.1.6-01.js; /cvsroot/mozilla/js/tests/js1_5/Function/10.1.6-01.js,v <-- 10.1.6-01.js new revision: 1.2; previous revision: 1.1
Flags: testcase?
Comment 8•19 years ago
|
||
Test cases for this are in ecma_3/Statements/regress-194364.js and js1_5/Function/10.1.6-01.js.
Flags: testcase? → testcase+
Comment 9•18 years ago
|
||
verified fixed 200604-1 1.8.0.2, 1.8, 1.9a1 win/mac/linux
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•