From 8dbab8945c6ef69678798588c00fec1179589d11 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Fri, 26 Jun 2015 09:45:32 +0100 Subject: [PATCH] mediawiki.log: Remove call to console.trace() for each warning When code that accesses a deprecated property is called multiple times, every time a deprecation message is logged and a stack trace produced. And all synchronously as well. This creates a duplicative mess in the console. Per T103891, T103610, and reports on IRC, this appears to have a tendency to crash Firebug. While less convenient, there are other ways to get the calling function from a warning (e.g. debugger, breakpoints, pause/step execution). We don't call it for mw.log.error, either. This should help reduce noise, speed up execution path, and hopefully prevent such crashes in the future. Change-Id: I80428a5e80dbb84b93be2f10340fe29d9bef12d3 --- resources/src/mediawiki/mediawiki.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index a815c99a82..2c88e93654 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -595,7 +595,6 @@ /** * Write a message the console's warning channel. - * Also logs a stacktrace for easier debugging. * Actions not supported by the browser console are silently ignored. * * @param {string...} msg Messages to output to console @@ -604,9 +603,6 @@ var console = window.console; if ( console && console.warn && console.warn.apply ) { console.warn.apply( console, arguments ); - if ( console.trace ) { - console.trace(); - } } }; -- 2.20.1