mw.loader: Guard localStorage access with try/catch in mw.store.clear()
authorBryan Davis <bd808@wikimedia.org>
Thu, 4 Feb 2016 16:19:25 +0000 (09:19 -0700)
committerBryan Davis <bd808@wikimedia.org>
Thu, 4 Feb 2016 23:41:49 +0000 (16:41 -0700)
commitf57044ee1c924a5215fbad0a2cd92f40affb7f23
tree5a639c62fcf2925cb761ddad67ba318349d460d9
parent2aba862486c0676d89c7d5531c1c27b30f284cc7
mw.loader: Guard localStorage access with try/catch in mw.store.clear()

We use try/catch appropriately in other places but it was missing
in mw.store.clear().

If the user agent has localStorage disabled an exception will be thrown
for any operation that touches the object.

Change-Id: Idcd0e4c8ba9b0843b2ddcad0ae1781e4915e04fe
resources/src/mediawiki/mediawiki.js