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
Unknown Object (File)
Fri, Nov 1, 4:08 AM
Unknown Object (File)
Sun, Oct 27, 2:01 AM
Unknown Object (File)
Oct 25 2024, 2:46 PM
Unknown Object (File)
Oct 18 2024, 12:16 AM
Unknown Object (File)
Oct 12 2024, 3:11 PM
Unknown Object (File)
Oct 9 2024, 10:44 AM
Unknown Object (File)
Oct 8 2024, 4:48 AM
Unknown Object (File)
Oct 8 2024, 4:48 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