mw.loader: Fix late loading of CSS in certain cases
authorRoan Kattouw <roan.kattouw@gmail.com>
Mon, 20 Jul 2015 22:22:56 +0000 (17:22 -0500)
committerRoan Kattouw <roan.kattouw@gmail.com>
Tue, 21 Jul 2015 00:54:29 +0000 (17:54 -0700)
commit2f8cd8f4d5d7238d1ede3a801cb470cd46431c0d
treead33e6b401b7a7c478ac3fe073a44b92d530cc6c
parent0a9ee5d9bf0047ec65c29ee35321d96191ecbff5
mw.loader: Fix late loading of CSS in certain cases

By protecting the CSS callbacks array against being
polluted by the callbacks themselves. This fixes
a bug where if A depends on B and both A and B have
styles, both A and B are executed once B's styles
have loaded (but before A's styles have loaded).
This breaks mw.loader's contract to only execute
A once its styles have loaded.

Bug: T105973
Change-Id: Ifa8fc7b3d275faa1f9a136a8c4a0e0a7cc358083
resources/src/mediawiki/mediawiki.js
tests/qunit/suites/resources/mediawiki/mediawiki.test.js