Opened 14 years ago

Closed 13 years ago

#271 closed defect (duplicate)

dojo.require: strange infinite recursion bug when string is assigned to Array.prototype.xxx or Object.prototype.xxx

Reported by: tavis@… Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.1
Keywords: Cc:
Blocked By: Blocking:

Description

The json.js library from www.json.org contains the following line:

Array.prototype.array = 'array';

When I load this library on any page using dojo.require() I get an infinite recursion error. The same error occurs if I include that line by itself in a script tag. Object.prototype.array = 'array' leads to the same error. If I assign a int, rather than a string to Array.prototype.array there is no error.

DEBUG: [InternalError: too much recursion, file: http://green.unsnarl.com/_javascript/dojo/src/bootstrap1.js, line: 93] DEBUG: [InternalError: too much recursion, file: http://green.unsnarl.com/_javascript/dojo/src/bootstrap1.js, line: 93] DEBUG: [InternalError: too much recursion, file: http://green.unsnarl.com/_javascript/dojo/src/bootstrap1.js, line: 93] ...

Attachments (1)

test_Checkbox.html (956 bytes) - added by tavis@… 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by tavis@…

Attachment: test_Checkbox.html added

comment:1 Changed 14 years ago by anonymous

btw, the order of the statements makes no difference.

comment:2 Changed 14 years ago by tavis@…

Firefox 1.5 on linux.

comment:3 Changed 13 years ago by adam@…

duplicate of #71?

comment:4 Changed 13 years ago by bill

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.