r84276 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84275‎ | r84276 | r84277 >
Date:22:18, 18 March 2011
Author:krinkle
Status:ok
Tags:
Comment:
per r83658 CR: mw.log.prefix is for identifying windows, not context. Using string concat instead
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -659,7 +659,7 @@
660660 * @param module string module name to execute
661661 */
662662 function execute( module ) {
663 - var _method = 'mw.loader::execute';
 663+ var _fn = 'mw.loader::execute> ';
664664 if ( typeof registry[module] === 'undefined' ) {
665665 throw new Error( 'Module has not been registered yet: ' + module );
666666 } else if ( registry[module].state === 'registered' ) {
@@ -692,7 +692,7 @@
693693 // Execute script
694694 try {
695695 registry[module].script( jQuery );
696 - mw.log( 'State ready: ' + module, _method )
 696+ mw.log( _fn + 'State ready: ' + module )
697697 registry[module].state = 'ready';
698698 // Run jobs who's dependencies have just been met
699699 for ( var j = 0; j < jobs.length; j++ ) {
@@ -719,8 +719,8 @@
720720 }
721721 }
722722 } catch ( e ) {
723 - mediaWiki.log( 'Exception thrown by ' + module + ': ' + e.message, _method );
724 - mediaWiki.log( e );
 723+ mw.log( _fn + 'Exception thrown by ' + module + ': ' + e.message );
 724+ mw.log( e );
725725 registry[module].state = 'error';
726726 // Run error callbacks of jobs affected by this condition
727727 for ( var j = 0; j < jobs.length; j++ ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83658Fixing minor issues with mw.loader...krinkle18:49, 10 March 2011

Status & tagging log