Closed Bug 339685 Opened 18 years ago Closed 18 years ago

"TypeError: d has invalid __iterator__ value undefined" after setting d.__proto__ to null

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Assigned: brendan)

References

Details

(Keywords: regression, testcase)

Attachments

(2 files)

 
Attached file testcase
Regressed between the May 17 nightly and the May 21 nightly.  Guessing the fix for bug 326466 (pythonic generators and iteration) is to blame.
Blocks: geniter
Just for my notes, this is also occurring in Venkman when trying to enumerate the properties of the Call scope object during debugging.
I think this is an important bug. The problem is that we look up d.__iterator__, execept that __iterator__ lives on Object.prototype, and because d.__proto__ = null, we don't find it and are unable to iterate over it. This will bite anybody trying to use objects as dictionaries or otherwise wants to enumerate an object whose prototype chain doesn't either define __iterator__ seperately or lead to Object.prototype.
OS: Mac OS X 10.4 → All
Hardware: Macintosh → All
Attached patch fixSplinter Review
mrbkap says r=him.

/be
Assignee: general → brendan
Status: NEW → ASSIGNED
Attachment #223978 - Flags: review+
Fixed on JS_1_7_ALPHA_BRANCH and trunk.

/be
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Checking in regress-339685.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-339685.js,v  <--  regress-339685.js
initial revision: 1.1
Flags: in-testsuite+
verified fixed 1.9 windows/mac(ppc|tel)/linux 20060810
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: