Closed Bug 873771 Opened 12 years ago Closed 12 years ago

TabRestoreQueue should keep track of and evaluate restore_on_demand prefs

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 24

People

(Reporter: ttaubert, Assigned: ttaubert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The refactoring from bug 865127 should go even further and read and check the restore_on_demand prefs. This way the main sessionstore module only needs to ask for a tab and gets one if there's more to be restored automatically.
Comment on attachment 751371 [details] [diff] [review] TabRestoreQueue should keep track of and evaluate restore_on_demand prefs Review of attachment 751371 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/components/sessionstore/src/SessionStore.jsm @@ +3237,1 @@ > return; I don't understand why you can simplify the condition that much. Have you moved all the logics to shift()? If so, what's the rationale? @@ +4456,5 @@ > // The separate buckets used to store tabs. > tabs: {priority: [], visible: [], hidden: []}, > > + // Lazy getter that returns whether tabs are restored on demand. > + get restoreOnDemand() { This should probably be renamed and/or namespaced so that we know at first glance it's a preference. What about moving this to TabRestoreQueue.Prefs.restoreOnDemand?
Attachment #751371 - Flags: review?(dteller) → review+
(In reply to David Rajchenbach Teller [:Yoric] from comment #2) > ::: browser/components/sessionstore/src/SessionStore.jsm > @@ +3237,1 @@ > > return; > > I don't understand why you can simplify the condition that much. > Have you moved all the logics to shift()? If so, what's the rationale? Indeed, it's all in shift() now. I figured that it's a lot easier to read the main sessionstore module if it doesn't have to care about the restore_on_demand prefs and whether we have pinned tabs that would be restored right now. If shift() returns a tab we can restore it, if not we're not really interested in finding out why and just accept that. > @@ +4456,5 @@ > > // The separate buckets used to store tabs. > > tabs: {priority: [], visible: [], hidden: []}, > > > > + // Lazy getter that returns whether tabs are restored on demand. > > + get restoreOnDemand() { > > This should probably be renamed and/or namespaced so that we know at first > glance it's a preference. > What about moving this to TabRestoreQueue.Prefs.restoreOnDemand? Yeah... so how about having a small Prefs object/module inside of sessionstore that simply holds live values of all the preferences we need? We can do that in a follow-up soon? This would remove a lot of boilerplate code.
(In reply to David Rajchenbach Teller [:Yoric] from comment #2) > What about moving this to TabRestoreQueue.Prefs.restoreOnDemand? Will do exactly this for now.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
Depends on: 875266
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Oh, hm. I just realized that this isn't one of the bugs that needs to be put behind a kill switch. Its regression (bug 875266) was quite "bad" anyway so let's fix this before re-landing.
Keywords: addon-compat
Target Milestone: Firefox 24 → ---
Re-landed with a fix for a tiny, stupid mistake that was the cause of bug 875266. https://hg.mozilla.org/integration/fx-team/rev/0ac101760944
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: