r92931 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92930‎ | r92931 | r92932 >
Date:03:48, 23 July 2011
Author:catrope
Status:ok
Tags:
Comment:
Change != {} to !$.isEmptyObject(): the former always returned true because objects are compared by reference. This didn't cause any realistic problems, though: the worst that could happen is that if you have a module name longer than the query string request limit (which is extremely unusual), mediawiki.js would probably go into an infinite loop.
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -788,7 +788,7 @@
789789
790790 // If the request would become too long, create a new one,
791791 // but don't create empty requests
792 - if ( limit > 0 && reqs[r] != {} && l + bytesAdded > limit ) {
 792+ if ( limit > 0 && !$.isEmptyObject( reqs[r] ) && l + bytesAdded > limit ) {
793793 // This request would become too long, create a new one
794794 r++;
795795 reqs[r] = {};

Status & tagging log