Page MenuHomePhabricator

Bug in mw.loader JS
Closed, ResolvedPublic

Description

Author: a.d.bergi

Description:
The input validating of mw.loader.load (line 995) makes no sense.

996 // Validate input
997 if ( typeof modules !== 'object' && typeof modules !== 'string' ) {
998 throw new Error( 'dependencies must be a string or an array, not a ' +
999 typeof dependencies )
1000 }

I'd guess it should be "modules" instead of "dependencies".


Version: unspecified
Severity: minor

Details

Reference
bz27532

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 11:22 PM
bzimport set Reference to bz27532.

it also doesn't seem to check suspended in mw.load

  • Bug 27970 has been marked as a duplicate of this bug. ***

(Chad H. wrote at bug 27970 comment #1)

Fixed in r83649.

Reopening as the suspended state (triggered by mw.loader.go() ) is still not checked.

It should be an easy fix but I feel like there may be a catch. I'll run some tests and if OK just add a simple if()-statement.

Looks like suspended is checked fine, it's checked in .loader.work, which is called from request(), which is called from mw.loader.load.

Marking as fixed.