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)
Firefox
Session Restore
Tracking
()
RESOLVED
FIXED
Firefox 24
People
(Reporter: ttaubert, Assigned: ttaubert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
6.77 KB,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
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.
| Assignee | ||
Comment 1•12 years ago
|
||
Attachment #751371 -
Flags: review?(dteller)
Comment 2•12 years ago
|
||
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+
| Assignee | ||
Comment 3•12 years ago
|
||
(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.
Updated•12 years ago
|
Keywords: addon-compat
| Assignee | ||
Comment 4•12 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] from comment #2)
> What about moving this to TabRestoreQueue.Prefs.restoreOnDemand?
Will do exactly this for now.
| Assignee | ||
Comment 5•12 years ago
|
||
| Assignee | ||
Comment 6•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
| Assignee | ||
Comment 7•12 years ago
|
||
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 8•12 years ago
|
||
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.
| Assignee | ||
Updated•12 years ago
|
Keywords: addon-compat
| Assignee | ||
Updated•12 years ago
|
Target Milestone: Firefox 24 → ---
| Assignee | ||
Comment 9•12 years ago
|
||
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
| Assignee | ||
Comment 10•12 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
You need to log in
before you can comment on or make changes to this bug.
Description
•