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
/**
* 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
var console = window.console;
if ( console && console.warn && console.warn.apply ) {
console.warn.apply( console, arguments );
- if ( console.trace ) {
- console.trace();
- }
}
};