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
F18371753: D19832.diff
Thu, Aug 28, 5:38 AM
F18102586: D19832.id47357.diff
Sat, Aug 9, 9:50 PM
F18095787: D19832.diff
Fri, Aug 8, 2:29 AM
F18095238: D19832.diff
Thu, Aug 7, 10:35 PM
F17949109: D19832.id47379.diff
Thu, Jul 31, 10:51 PM
Unknown Object (File)
Jun 19 2025, 11:06 PM
Unknown Object (File)
Jun 4 2025, 6:12 AM
Unknown Object (File)
Jun 4 2025, 12:34 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
Branch
firefox1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21206
Build 28839: Run Core Tests
Build 28838: arc lint + arc unit