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

[e10s] Unable to restore closed private tabs #239

Closed
Infocatcher opened this issue Jan 11, 2017 · 1 comment
Closed

[e10s] Unable to restore closed private tabs #239

Infocatcher opened this issue Jan 11, 2017 · 1 comment

Comments

@Infocatcher
Copy link
Owner

Infocatcher commented Jan 11, 2017

Disabled by default, for extensions.privateTab.rememberClosedPrivateTabs = true

[from Firefox 52.0a2 (2017-01-10)]
resource:///modules/sessionstore/SessionStore.jsm
SessionStoreInternal.undoCloseTab()
-> SessionStoreInternal.restoreTab()

    if ("attributes" in tabData) {
      // Ensure that we persist tab attributes restored from previous sessions.
      Object.keys(tabData.attributes).forEach(a => TabAttributes.persist(a));
    }
    ...
    browser.messageManager.sendAsyncMessage("SessionStore:restoreHistory",
                                            {tabData: tabData, epoch: epoch, loadArguments});

chrome://browser/content/content-sessionStore.js
--> MessageListener.receiveMessage()
-> MessageListener.restoreHistory()
-> sendSyncMessage("SessionStore:restoreHistoryComplete", …)

resource:///modules/sessionstore/SessionStore.jsm
--> SessionStoreInternal.receiveMessage()

        let event = win.document.createEvent("Events");
        event.initEvent("SSTabRestoring", true, false);
        tab.dispatchEvent(event);

So, loading will be started before "SSTabRestoring" and in non-private mode.

@Infocatcher
Copy link
Owner Author

Looks like we can receive "SessionStore:restoreHistory" in our frame script and check for

message.data.tabData.attributes["privateTab-isPrivate"]

Infocatcher added a commit that referenced this issue Jan 12, 2017
Also now we can't use "SSTabRestoring", will dispatched too late: #239
(#237)
Infocatcher added a commit that referenced this issue Jan 12, 2017
E.g. for restored non-remote tabs (now also used to toggle private state using tag duplication)
(#239)
Infocatcher added a commit that referenced this issue Jan 14, 2017
* ignore wrong "last-pb-context-exited"
* restore closed private tabs in e10s-mode (#239)
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

1 participant