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

Don't save private tabs in sessions #36

Closed
Infocatcher opened this issue Apr 16, 2013 · 5 comments
Closed

Don't save private tabs in sessions #36

Infocatcher opened this issue Apr 16, 2013 · 5 comments

Comments

@Infocatcher
Copy link
Owner

Reported here: https://addons.mozilla.org/addon/private-tab/reviews/453696/

Infocatcher added a commit that referenced this issue Apr 16, 2013
Also getTabState() may be undefined on window "unload"
(enhancement for #6, related to #36)
Infocatcher added a commit that referenced this issue Apr 16, 2013
Private windows aren't saved as is, without our manipulations
(for #36)
Infocatcher added a commit that referenced this issue Apr 16, 2013
Infocatcher added a commit that referenced this issue Apr 17, 2013
…state-write" notification

Fix both "File - Exit" and crash recovery
(for #36)
Infocatcher added a commit that referenced this issue Apr 17, 2013
nsISessionStore may save data after our shutdown
(for #36)
Infocatcher added a commit that referenced this issue Apr 17, 2013
+ workaround for SeaMonkey
(for #36)
@Infocatcher
Copy link
Owner Author

Known issue: SeaMonkey doesn't dispatch "SSWindowClosing" event, so we use "close" or "beforeunload". As a result private tabs will be removed anyway, if browser will ask confirmation to close multiple tabs.

Infocatcher added a commit that referenced this issue Apr 18, 2013
Looks like SeaMonkey bug, but it's very easy to fix
(for #36)
Infocatcher added a commit that referenced this issue Apr 18, 2013
@Infocatcher
Copy link
Owner Author

Seems all works now, closed.

Second known issue: Session Manager still saves private tabs in sessions.
Should be fixed from Session Manager side, I think.

@Infocatcher
Copy link
Owner Author

Should be fixed from Session Manager side, I think.

=> http://forums.mozillazine.org/viewtopic.php?p=12807329#p12807329

@Morac2
Copy link

Morac2 commented Apr 19, 2013

I'll mention that your current fix results in corrupted session data in sessionstore.js if the current selected tab in the window is the private tab or after it. There is a "windows[i].tab[i].selected" field that should match the index of the selected tab (starting with 1). When your code strips out the private tab it doesn't update the index.

So for example if there are two tabs in the window: a normal and private, and the private one is selected, the "selected" value will be 2, even though there will only be one tab stored in the session for that window.

This does seem to get cleaned up when the browser is exited, but on a crash it is not. SessionStore has some smarts to prevent selecting a tab that doesn't exists, but it could still result in the wrong tab being selected after a crash.

Infocatcher added a commit that referenced this issue Apr 19, 2013
@Infocatcher
Copy link
Owner Author

but it could still result in the wrong tab being selected after a crash

Oh, I forgot about this case. Thanks, corrected: 332ddcb

Infocatcher added a commit that referenced this issue Apr 23, 2013
… tabs

Especially with browser.tabs.closeWindowWithLastTab = true
(correction for #36, fix #39)
Infocatcher added a commit that referenced this issue May 1, 2013
(workaround for #53, part 4; also related to #36 in SeaMonkey)
Infocatcher added a commit that referenced this issue May 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants