From parent bug: Extensions desiring to selectively forget information about closed tabs/windows have to be quite inventive. What about a new API: void forgetClosedTab(in nsIDOMWindow aWindow, in unsigned long aIndex);
Created attachment 409308 [details] [diff] [review] patch Patch with test. I disabled some of tests related to our specific implementation of undCloseTab and bug 478707. Rest of tests passing.
Comment on attachment 409308 [details] [diff] [review] patch I don't think this relates to our version of undoCloseTab.
Sorry, i just mean that because of our specific implementation of undoCloseTab, bug 478707 exist, and we have little mess with getClosedTabData. We don't restore closed tab data or save it when setWindowState called. That's why disabled test fail.
Right, but this API is to forget about the closed tab of an open window, and we currently track that on the tabbrowser instead. At least from our point of view, it would make more sense to provide the API on the tabbrowser too, and it would simply destroy the saved browser in much the same way as the code at the end of removeTab destroys the oldest saved browser if it overflows the undo stack.
Created attachment 409676 [details] [diff] [review] suggestion implemented. Done as Neil suggested. Also i replaced gBrowser by getBrowser(). Test is almost useless now, it only check for wrong parameters, until bug 478707 will be fixed.
Comment on attachment 409676 [details] [diff] [review] suggestion implemented. >+ <method name="forgetSavedBrowser"> I wonder whether Firefox would be interested in an API on tabbrowser. >+ <parameter name="aIndex"/> Need to validate aIndex here, in case anyone calls it directly. >+ aIndex = aIndex || 0; Don't need this, XPConnect already defaults to 0. (And you'll be validating in the tabbrowser anyway, right?) >+ ss.setWindowState(newWin, JSON.stringify(test_state), true); Maybe we can add and close tabs directly, thus simulating closed tabs?
Created attachment 409893 [details] [diff] [review] comments fixed. Well, all done as suggested. Tests all enabled and passing.
Comment on attachment 409893 [details] [diff] [review] comments fixed. Warning: 9 lines add whitespace errors. >diff --git a/suite/common/src/nsSessionStore.js b/suite/common/src/nsSessionStore.js >--- a/suite/common/src/nsSessionStore.js >+++ b/suite/common/src/nsSessionStore.js >@@ -23,6 +23,7 @@ > * Ehsan Akhgari <firstname.lastname@example.org> > * Paul OâShannessy <email@example.com> > * Nils Maier <firstname.lastname@example.org> >+ * Michael Kraft <email@example.com> In this file, the changes are all yours :-) >+ "... and tabs not specifically forgetten weren't."); Nit: forgotten
Created attachment 410720 [details] [diff] [review] for checkin [Checkin: Comment 10] patch for checkin, carrying forward r+ and sr+ from Neil.
Comment on attachment 410720 [details] [diff] [review] for checkin [Checkin: Comment 10] http://hg.mozilla.org/comm-central/rev/401efe3c7c6a
I guess we can close this bug.