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
F13063136: D19832.diff
Sat, Apr 20, 4:59 AM
Unknown Object (File)
Wed, Apr 17, 2:35 PM
Unknown Object (File)
Sat, Apr 13, 2:41 PM
Unknown Object (File)
Fri, Apr 12, 9:19 PM
Unknown Object (File)
Thu, Apr 11, 7:25 AM
Unknown Object (File)
Wed, Apr 10, 6:53 AM
Unknown Object (File)
Tue, Mar 26, 7:12 PM
Unknown Object (File)
Feb 3 2024, 7: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