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)
Sat, Jan 25, 2:38 AM
Unknown Object (File)
Sat, Jan 25, 2:38 AM
Unknown Object (File)
Sat, Jan 25, 2:38 AM
Unknown Object (File)
Tue, Jan 21, 9:38 AM
Unknown Object (File)
Dec 29 2024, 7:05 PM
Unknown Object (File)
Dec 16 2024, 4:46 AM
Unknown Object (File)
Nov 29 2024, 10:55 AM
Unknown Object (File)
Nov 1 2024, 4:08 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