Page MenuHomePhabricator

Recover when cookies are disabled in Firefox and accessing localStorage throws
ClosedPublic

Authored by epriestley on Nov 24 2018, 2:25 PM.
Tags
None
Referenced Files
F15485860: D19832.diff
Thu, Apr 10, 3:04 AM
F15445053: D19832.id47357.diff
Thu, Mar 27, 12:22 PM
F15437719: D19832.id47357.diff
Tue, Mar 25, 9:10 PM
F15430425: D19832.id.diff
Mon, Mar 24, 7:36 AM
F15429355: D19832.diff
Mon, Mar 24, 1:46 AM
F15415797: D19832.id47357.diff
Thu, Mar 20, 7:54 AM
F15414775: D19832.diff
Thu, Mar 20, 2:30 AM
F15399504: D19832.diff
Mon, Mar 17, 4:55 AM
Subscribers
None

Details

Summary

Ref T13216. See PHI985. If you disable cookies in Firefox, accessing window.localStorage throws an exception. Currently, this pretty much kills all scripts on the page.

Instead, catch and ignore this, as though window.localStorage was not defined.

Test Plan
  • Set Firefox to "no cookies".
  • Loaded any page while logged out.
  • Before: JS fatal early in the stack.
  • After: page loads and JS works.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable