Closed Bug 596651 Opened 14 years ago Closed 6 years ago

session store should ignore web apps

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: fabrice, Assigned: fabrice)

References

Details

Attachments

(1 file)

We don't want web apps to show in the "tabs from last time" section.
Assignee: nobody → fabrice
Blocks: 583750
Attached patch patch v1 (deleted) — Splinter Review
The idea in this patch is to check if we have a browser window opened and only save state in this case. This covers all cases : starting with either a web app or a browser, and closing any of them.
Attachment #483347 - Flags: review?(mark.finkle)
Comment on attachment 483347 [details] [diff] [review] patch v1 ># HG changeset patch ># Parent ab85a3a642cd1ba0cc1b1fac90d5f449c979c33c ># User Fabrice Desré <fabrice@mozilla.com> > >Bug 596651 - session store should ignore web apps > >diff --git a/components/SessionStore.js b/components/SessionStore.js >--- a/components/SessionStore.js >+++ b/components/SessionStore.js >@@ -370,6 +370,15 @@ SessionStore.prototype = { > > _getCurrentState: function ss_getCurrentState() { > let self = this; >+ let hasBrowser = false; >+ this._forEachBrowserWindow(function(aWindow) { >+ if (!aWindow.document.getElementById("main-window").hasAttribute("webapp")) >+ hasBrowser = true; >+ }); >+ >+ if (!hasBrowser) >+ return; >+ > this._forEachBrowserWindow(function(aWindow) { > self._collectWindowData(aWindow); > }); I think this isn't exactly what we want. If we have 2 webapps and 1 fennec window, hasBrowser will be true. Why not just do this: > this._forEachBrowserWindow(function(aWindow) { > if (!aWindow.document.getElementById("main-window").hasAttribute("webapp")) > self._collectWindowData(aWindow); > });
Attachment #483347 - Flags: review?(mark.finkle) → review-
We need the hasBrowser boolean, because without it we clear the session list when there are only webapps openened.
tracking-fennec: --- → 7+
resetting the tracking because we don't need this now and its not clear if we'll need this in the future
tracking-fennec: 7+ → ---
Closing all opened bug in a graveyard component
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: