Changeset 3317 for branches/2.2/jabberit_messenger/jmessenger/js/strophe.js
- Timestamp:
- 10/01/10 17:17:49 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/jabberit_messenger/jmessenger/js/strophe.js
r3264 r3317 458 458 */ 459 459 460 /* 460 461 if (!Array.prototype.indexOf) 461 462 { … … 479 480 }; 480 481 } 482 */ 481 483 482 484 /* All of the Strophe globals are defined in this special function below so … … 2735 2737 _dataRecv: function (req) 2736 2738 { 2737 try { 2739 var arrayIndexOf = function( pArray, pInd) 2740 { 2741 var len = pArray.length; 2742 2743 for( var i = 0 ; i < len; i++ ) 2744 { 2745 if( pArray[i] == pInd ) 2746 return i; 2747 } 2748 2749 return -1; 2750 }; 2751 2752 try { 2738 2753 var elem = req.getResponse(); 2739 2754 } catch (e) { … … 2748 2763 // remove handlers scheduled for deletion 2749 2764 var i, hand; 2750 while (this.removeHandlers.length > 0) { 2765 while (this.removeHandlers.length > 0) 2766 { 2751 2767 hand = this.removeHandlers.pop(); 2752 i = this.handlers.indexOf(hand); 2753 if (i >= 0) { 2768 //i = this.handlers.indexOf(hand); 2769 i = arrayIndexOf( this.handlers, hand ); 2770 2771 if ( i >= 0 ) 2772 { 2754 2773 this.handlers.splice(i, 1); 2755 2774 } … … 3438 3457 _onIdle: function () 3439 3458 { 3440 var i, thand, since, newList; 3459 var arrayIndexOf = function( pArray, pInd) 3460 { 3461 var len = pArray.length; 3462 3463 for( var i = 0 ; i < len; i++ ) 3464 { 3465 if( pArray[i] == pInd ) 3466 return i; 3467 } 3468 3469 return -1; 3470 }; 3471 3472 var i, thand, since, newList; 3441 3473 3442 3474 // remove timed handlers that have been scheduled for deletion 3443 while (this.removeTimeds.length > 0) { 3475 while (this.removeTimeds.length > 0) 3476 { 3444 3477 thand = this.removeTimeds.pop(); 3445 i = this.timedHandlers.indexOf(thand); 3446 if (i >= 0) { 3478 //i = this.timedHandlers.indexOf(thand); 3479 i = arrayIndexOf( this.timedHandlers, thand ); 3480 3481 if (i >= 0) 3482 { 3447 3483 this.timedHandlers.splice(i, 1); 3448 3484 }
Note: See TracChangeset
for help on using the changeset viewer.