resourceloader: Use null-objects for 'sources' and 'registry'
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 15 Sep 2018 17:54:19 +0000 (18:54 +0100)
committerKrinkle <krinklemail@gmail.com>
Sat, 15 Sep 2018 18:53:45 +0000 (18:53 +0000)
commit46daa86cb11fe69a8b2fa027cff76033ca5231d5
tree860112061c4a29fbb6f5111070a80b0488cea838
parentd0a80f222e53bb669a5ec3a25955a4d9311445ec
resourceloader: Use null-objects for 'sources' and 'registry'

Follows-up e5912535aea, and removes the last use of
Object.prototype-inheriting objects for map-like objects, in
mediawiki.js.

I'd like to consider using ES6 Map as well, with a partial shim
like we do for StringSet/Set, but that'll require some more
refactoring. It's also not clear whether it will improve
execution speed and/or memory use. Worth trying at a later time,
though.

The current change simply removes the inheritance and simplifies
the code. Apart from slightly smaller code, I could not find any
notable/reproducible improvement in either NavTiming metrics or
CPU time spent in 'Scripting'. The metrics are in the same range
as before this changes.

Change-Id: Ie0016667d9291dcfafde61289d5444817be3447d
resources/src/startup/mediawiki.js