Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the ViewHistory localStorage (and sessionStorage) key from database to pdfjs.history, and migrate existing data on read (issue 7760) #7793

Merged
merged 1 commit into from
Nov 21, 2016

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Nov 8, 2016

For consistency, I also renamed the FIREFOX/MOZCENTRAL sessionStorage key, but given that sessionStorage is a lot less permanent than localStorage it didn't seem necessary to migrate any existing values.

Fixes #7760.


This change is Reviewable

Copy link
Contributor

@yurydelendik yurydelendik left a comment

Choose a reason for hiding this comment

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

Looks good, but move localStorage.removeItem('database'); inside if (!value) {, or even deeper, and check if it's valid -- we don't want to remove someone's "database"

…database` to `pdfjs.history`, and migrate existing data on read (issue 7760)

For consistency, I also renamed the `FIREFOX/MOZCENTRAL` sessionStorage key, but given that sessionStorage is a lot less permanent than localStorage it didn't seem necessary to migrate any existing values.

Fixes 7760.
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/2f171d9bdca89f5/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/2f171d9bdca89f5/output.txt

Total script time: 2.72 mins

Published

@timvandermeij timvandermeij merged commit 787d887 into mozilla:master Nov 21, 2016
@timvandermeij
Copy link
Contributor

Thank you for fixing this!

@Snuffleupagus Snuffleupagus deleted the ViewHistory-storage-key-name branch November 21, 2016 20:21
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
…e-key-name

Rename the `ViewHistory` localStorage (and sessionStorage) key from `database` to `pdfjs.history`, and migrate existing data on read (issue 7760)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants