Repository navigation
[rustdoc] Fix storage usage when disabled - #61462
Conversation
|
I'm using Firefox 67.0. |
|
Hum, that's not very ideal. This fix is pretty simple but it'd have been nice to have a confirmation before actually merging it in case it was useless or not solving your issue. |
|
I finally managed to build it with |
|
Perfect, thanks! Just waiting for someone to review now. cc @rust-lang/rustdoc |
There was a problem hiding this comment.
What is the typeof window !== 'undefined' check for?
There was a problem hiding this comment.
Good catch! I'll update the code soon.
|
It looks like this is actually quite tricky to get right. How about borrowing the code from https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API#Testing_for_availability instead? |
|
This code seems quite long to run (to be confirmed!). Saving its state should be enough though. |
|
Pro tip: when letting others test a build, you can |
|
@ollie27: The code sample you linked checks too many things for us (like if the |
977fc82 to
cf8bb56
Compare
|
@ishitatsuyuki Thanks for the tip! |
|
Updated. |
According to the MDN page they linked, we may still get errors about
Also, couldn't we move the final |
|
Interesting. I'll check on safari to see its behaviour. |
cf8bb56 to
4eb19d1
Compare
Excellent idea! I did it.
I tried on safari, both private and "normal" modes worked fine (I could set settings everything just fine). |
|
ping from triage @Manishearth waiting for your review on this |
|
@bors r+ (note for triage: i'm helping out with rustdoc reviews, but please don't block rustdoc reviews on me) |
|
Nothing happened apparently? I'll close then reopen and give it another try. |
|
@bors: r=Manishearth |
|
📌 Commit 4eb19d1 has been approved by |
[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
|
☀️ Test successful - checks-azure, checks-travis, status-appveyor |
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