Skip to content

Commit

Permalink
Auto merge of #61462 - GuillaumeGomez:fix-local-storage, r=Manishearth
Browse files Browse the repository at this point in the history
[rustdoc] Fix storage usage when disabled

Fixes #61239.

@starblue: Can you give a try to this change please? I tried on chrome and firefox and both worked so if you're using another web browser, that might be useful. :)

r? @Manishearth
  • Loading branch information
bors committed Jul 12, 2019
2 parents cd1381e + 4eb19d1 commit 71f9384
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/librustdoc/html/static/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ function usableLocalStorage() {
// preferences deny access to localStorage, e.g., to prevent storage of
// "cookies" (or cookie-likes, as is the case here).
try {
window.localStorage;
return window.localStorage !== null && window.localStorage !== undefined;
} catch(err) {
// Storage is supported, but browser preferences deny access to it.
return false;
}

return true;
}

function updateLocalStorage(name, value) {
Expand Down

1 comment on commit 71f9384

@starblue
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that nightly now works with Firefox 67.0.4 (64-bit). Thanks!

Please sign in to comment.