Opened 14 years ago

Closed 13 years ago

Last modified 12 years ago

#71 closed defect (fixed)

infinite recursion when property added to Array prototype

Reported by: manzoid Owned by: alex
Priority: high Milestone:
Component: General Version: 0.1
Keywords: Cc:
Blocked By: Blocking:

Description

I tried using JSON in conjunction with Dojo. JSON includes this line:

Array.prototype.array = 'array';

This hangs the browser. Debugging w/ Venkman shows we got to a recursion depth of nearly 1,000 here:

package.js [parseProperties] 2950 2978 131012 994 72625 11921.88 25296.88

David spent some time stepping thru to examine this, and thought it might be due to someone inadvisedly using "for...in" to iterate through an array, which would then trip up when an extra property is thrown in. However he grepped around a bit for that and didn't find a culprit.

Attachments (1)

profile_json.csv (28.1 KB) - added by manzoid 14 years ago.
venkman profile of what was hanging the browser

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by manzoid

Attachment: profile_json.csv added

venkman profile of what was hanging the browser

comment:1 Changed 13 years ago by bill

Milestone: 0.3.1
Resolution: fixed
Status: newclosed
Version: 0.1

I added the line

Array.prototype.array = 'array';

to test_Toolbar.js; it seemed to load fine. I guess this bug is fixed.

comment:2 Changed 12 years ago by (none)

Milestone: 0.3.1

Milestone 0.3.1 deleted

Note: See TracTickets for help on using tickets.