resourceloader: Use content-neutral context when computing module versions
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 16 Jun 2015 03:57:12 +0000 (04:57 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 18 Jun 2015 20:10:41 +0000 (21:10 +0100)
commitaac831f9fafef05c6958c710fe739ea0f323e84a
treebb2fd3a765f0aa118bb4330f18baca722c352df1
parentf371574b79f48d23408863a40a6fce38cf994eff
resourceloader: Use content-neutral context when computing module versions

The startup module produces a manifest with versions representing the
entire module.

Typically, the request for the startup module itself has only=scripts.
However, that "only" must only apply to what resources of the startup module are
output in the request.

The context passed to getModifiedTime() and getVersionHash() must not suggest
any restriction of measuring only the scripts, or otherwise ignoring some
aspects of the module (such as stylesheets, or messages).

Most existing getModifiedTime() implementations compute timestamps of all
files, regardless of the context. So this bug didn't surface before.
However that will change for modules that compute the version hash based on
getModuleContent(), which does honour the getOnly() and shouldIncludeScripts()
methods of the request context.

Change-Id: Ib8f09c39d10724d146b53b6d53d82da18944a12b
includes/resourceloader/ResourceLoaderModule.php