Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/55902


Change subject: mw.loader: Add debugging for mw.loader#canExpandStylesheetWith
......................................................................

mw.loader: Add debugging for mw.loader#canExpandStylesheetWith

Reports indicate something is incorrectly calling this, causing
uncaught exceptions. This will give us a stracktrace.

Change-Id: I34a488247186677f3bb627a2f1dc4faac4dd2e9b
---
M resources/mediawiki/mediawiki.js
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/02/55902/1

diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js
index 2ceb3ea..0d61302 100644
--- a/resources/mediawiki/mediawiki.js
+++ b/resources/mediawiki/mediawiki.js
@@ -461,6 +461,11 @@
                         * @return {boolean} False if a new one must be created.
                         */
                        function canExpandStylesheetWith( cssText ) {
+                               // Debug hack to trace the source of garbage 
input to mw.loader
+                               if ( typeof cssText !== 'string' ) {
+                                       throw new Error( 'Illegal invokation of 
path mw.loader#canExpandStylesheetWith' );
+                               }
+
                                // Makes sure that cssText containing `@import`
                                // rules will end up in a new stylesheet (as 
those only work when
                                // placed at the start of a stylesheet; bug 
35562).

-- 
To view, visit https://gerrit.wikimedia.org/r/55902
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34a488247186677f3bb627a2f1dc4faac4dd2e9b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <ttij...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to