r107358 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107357‎ | r107358 | r107359 >
Date:02:44, 27 December 2011
Author:krinkle
Status:ok
Tags:
Comment:
[mediawiki.js] Always pass error info to error callbacks in mw.loader
* Fix for handlePending() provided by Michael Dale
* Fixes (bug 30709) Always pass error info to error callbacks in mw.loader
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -616,7 +616,7 @@
617617 for ( var j = 0; j < jobs.length; j++ ) {
618618 if ( $.inArray( module, jobs[j].dependencies ) !== -1 ) {
619619 if ( $.isFunction( jobs[j].error ) ) {
620 - jobs[j].error();
 620+ jobs[j].error( e, module );
621621 }
622622 jobs.splice( j, 1 );
623623 j--;
@@ -1053,7 +1053,8 @@
10541054 // If any dependencies have errors execute error immediately
10551055 else if ( filter( ['error'], dependencies ).length ) {
10561056 if ( $.isFunction( error ) ) {
1057 - error();
 1057+ error( new Error( 'one or more dependencies have state "error"' ),
 1058+ dependencies );
10581059 }
10591060 }
10601061 // Since some dependencies are not yet ready, queue up a request

Status & tagging log