Opened 11 years ago

Closed 8 years ago

Last modified 8 years ago

#7764 closed defect (fixed)

Specific value instead of .length property uses in hostenv_browser.js

Reported by: hakanson Owned by: James Burke
Priority: high Milestone: 1.7
Component: Core Version: 1.2beta
Keywords: Cc:
Blocked By: Blocking:

Description

This is a picky, latent bug, but I thought I would report for completness.

In dojo\_base\_loader\hostenv_browser.js (1.2rc2)

line 138 declares an array of length 3

d._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];

line 150-151 assumes length (doesn't use .length property)

for(var i=0; i<3; ++i){

var progid = d._XMLHTTP_PROGIDS[i];

line 159 changes the array, so the length is no longer 3

d._XMLHTTP_PROGIDS = [progid]; so faster next time

This is a bug, because if you add any items to this array, the length is no longer 3 (should use d._XMLHTTP_PROGIDS)

Change History (4)

comment:1 Changed 11 years ago by James Burke

Component: GeneralCore
Milestone: tbdfuture
Owner: changed from anonymous to James Burke

comment:2 Changed 8 years ago by ben hockey

Resolution: fixed
Status: newclosed

as of dojo 1.7 this file no longer exists

comment:3 Changed 8 years ago by ben hockey

note: in dojo/dojo.js and dojo/_base/xhr.js code still exists that has a hard-coded 3 but the array is never exposed so the assumption is safe

comment:4 Changed 8 years ago by bill

Milestone: future1.7
Note: See TracTickets for help on using tickets.