Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

serialize app state saves #3632

Merged
merged 1 commit into from
Sep 3, 2016
Merged

serialize app state saves #3632

merged 1 commit into from
Sep 3, 2016

Conversation

bridiver
Copy link
Collaborator

@bridiver bridiver commented Sep 1, 2016

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Ran git rebase -i to squash commits if needed.

fixes #3543

cc @BrendanEich

There is still an issue with initiateSessionStateSave because it's possible for the calls to overlap and potentially call saveIfAllCollected before getting state from all the windows. This is possible because it only checks the count and doesn't check to make sure it has state for each active window id.

@bridiver
Copy link
Collaborator Author

bridiver commented Sep 1, 2016

not really sure what to do for a test plan here because the issue is hard to replicate

@bbondy
Copy link
Member

bbondy commented Sep 1, 2016

test plan wise just verify it doesn't regress anything in saving / loading state.

@bbondy bbondy added this to the 0.11.7dev milestone Sep 1, 2016
@bridiver
Copy link
Collaborator Author

bridiver commented Sep 1, 2016

I tested periodic saves and save on quit. Should also probably test save on upgrade, but there's no reason that would be different than save on quit. I'm going to try setting the periodic timer to a very short interval to force some overlap

@bridiver
Copy link
Collaborator Author

bridiver commented Sep 1, 2016

set periodic save delay to 1ms and verified that each save/rename block happened sequentially

@@ -63,6 +63,7 @@ const flash = require('../js/flash')
const contentSettings = require('../js/state/contentSettings')
const privacy = require('../js/state/privacy')
const basicAuth = require('./browser/basicAuth')
const async = require('async')
Copy link
Member

Choose a reason for hiding this comment

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

It's better to require only async/queue so it doesn't pull in everything, pls do in a follow up, I won't block merging this though on it.

@bbondy
Copy link
Member

bbondy commented Sep 3, 2016

++

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

Successfully merging this pull request may close these issues.

potential race condition on session state save
4 participants