Ticket #5961 (closed defect: fixed)

Opened 9 months ago

Last modified 8 months ago

[patch][ccla]dojo.indexOf on a hash loops forever

Reported by: peller Owned by: alex
Priority: normal Milestone: 1.1
Component: General Version: 1.0
Severity: normal Keywords:
Cc:

Description

dojo.indexOf({a:1},"a");

see #5956

Attachments

5961.patch (6.9 kB) - added by peller 9 months ago.
fix passing in array (array.length is undefined) as well as bounds checking to prevent infinite loop

Change History

Changed 9 months ago by peller

should probably return -1, as Mozilla does.

>>> Array.indexOf({a:1},'a')
-1

Changed 9 months ago by alex

  • status changed from new to assigned
  • owner changed from anonymous to alex
  • milestone set to 1.1

Changed 9 months ago by peller

  • status changed from assigned to closed
  • resolution set to fixed

(In [12683]) Avoid infinite loop in indexOf. Fixes #5961

Changed 9 months ago by peller

  • status changed from closed to reopened
  • resolution deleted

re-b0rken by [12798]

Changed 9 months ago by peller

  • summary changed from dojo.indexOf on a hash loops forever to [patch][ccla]dojo.indexOf on a hash loops forever

Changed 9 months ago by peller

fix passing in array (array.length is undefined) as well as bounds checking to prevent infinite loop

Changed 8 months ago by alex

  • status changed from reopened to closed
  • resolution set to fixed

(In [13155]) merging adam peller's patch for infinite loop catching. Fixes #5961. !strict

Note: See TracTickets for help on using tickets.