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

[Firefox] Workaround for sessionStorage error when the preference network.cookie.lifetimePolicy is set to 1 (bug 1000777) #4679

Merged
merged 1 commit into from
Apr 25, 2014

Conversation

Snuffleupagus
Copy link
Collaborator

The error is described in bug 365772, which is a seven (!) year old bug :-(

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1000777.

@Snuffleupagus Snuffleupagus changed the title [Firefox] Workaround for sessionStorage error when the prefenence network.cookie.lifetimePolicy is set to 1 (bug 1000777) [Firefox] Workaround for sessionStorage error when the preference network.cookie.lifetimePolicy is set to 1 (bug 1000777) Apr 25, 2014
@yurydelendik
Copy link
Contributor

bug 365772 is talking about writing the value has the same issue. shall we add the same below? otherwise looks good

@Snuffleupagus
Copy link
Collaborator Author

I thought about doing that, but was unsure if it would degrade performance to wrap every sessionStorage.setItem in try-catch, since we call ViewHistory.set five times for every call to updateViewarea.
It seems that the error as such isn't the problem here, but rather the fact that it's currently preventing us from resolving the promise.

@Snuffleupagus
Copy link
Collaborator Author

In principle I'd like to add try-catch to setItem as well, so I'd be happy to add that to this PR and then follow-up with a PR that reduces the number of ViewHistory.set calls from 5 -> 1 (per updateViewarea call) if that sounds good.

@yurydelendik
Copy link
Contributor

it would degrade performance to wrap every

I would not worry about performance there, it's a really small price we have to pay

@yurydelendik
Copy link
Contributor

I'd like to add try-catch to setItem as well, so I'd be happy to add that to this PR

Yes, please. Also, ideally we have to reject the promise and handle the rejection on the callee's side. But that can happen in follow up PRs.

…work.cookie.lifetimePolicy is set to 1 (bug 1000777)
@Snuffleupagus
Copy link
Collaborator Author

Done.

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/8ed1100eaa04b90/output.txt

yurydelendik added a commit that referenced this pull request Apr 25, 2014
[Firefox] Workaround for sessionStorage error when the preference network.cookie.lifetimePolicy is set to 1 (bug 1000777)
@yurydelendik yurydelendik merged commit 094d0e2 into mozilla:master Apr 25, 2014
@yurydelendik
Copy link
Contributor

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants