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
F18984988: D19832.id47357.diff
Mon, Nov 17, 12:50 PM
F18783301: D19832.id.diff
Oct 13 2025, 5:52 AM
F18781894: D19832.diff
Oct 12 2025, 11:59 PM
F18755120: D19832.id47379.diff
Oct 5 2025, 3:54 AM
F18733856: D19832.id.diff
Sep 30 2025, 10:43 PM
F18730134: D19832.diff
Sep 30 2025, 12:13 PM
F18701460: D19832.diff
Sep 27 2025, 7:07 PM
F18701436: D19832.diff
Sep 27 2025, 6:59 PM
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