Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/317712
Change subject: mediawiki.storage: Catch exceptions on window.localStorage property access ...................................................................... mediawiki.storage: Catch exceptions on window.localStorage property access Follows-up 430a0d3984, which created a private property that stored a reference to the localStorage object outside the get and set methods. Where previously it was used directly, and as such, covered by the try/catch around getItem and setItem calls. Bug: T148998 Change-Id: Ibe75408913d4ffbf1791e1a6470296b29f809185 --- M resources/src/mediawiki/mediawiki.storage.js 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/12/317712/1 diff --git a/resources/src/mediawiki/mediawiki.storage.js b/resources/src/mediawiki/mediawiki.storage.js index cb62fbf..a9d17ff 100644 --- a/resources/src/mediawiki/mediawiki.storage.js +++ b/resources/src/mediawiki/mediawiki.storage.js @@ -10,7 +10,14 @@ */ mw.storage = { - localStorage: window.localStorage, + localStorage: ( function () { + // Catch exceptions to avoid fatal in Chrome's "Block data storage" mode + // which throws when accessing the localStorage property itself, as opposed + // to the standard behaviour of throwing on getItem/setItem. (T148998) + try { + return window.localStorage; + } catch ( e ) {} + }() ), /** * Retrieve value from device storage. -- To view, visit https://gerrit.wikimedia.org/r/317712 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe75408913d4ffbf1791e1a6470296b29f809185 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle <krinklem...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits