Closed Bug 609592 Opened 15 years ago Closed 15 years ago

Win7 JumpList is freeing up resources too early for History

Categories

(Firefox :: Shell Integration, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 4.0b8

People

(Reporter: mak, Assigned: mak)

References

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

Attached patch patch v1.0 (obsolete) — Splinter Review
Bug 598229 made queries async, but the final call to free() is sync, thus we end up killing this._builder before queries complete (first problem). Plus the timing we fire the queries seems still wrong since closing the connection fails when the final query runs (second problem). This is reproduce-able by just running a single b-c test on win7, you'll see a "this._builder is undefined" error plus a "unable to close connection" assertion. Since changing all the shutdown code would add far more complication to a relatively simple code (And make it dependent on Places shutdown, that I want to avoid if possible), and since on shutdown we need to update only if history is empty, I'm attaching a small optimization that will just empty the lists if history is empty. This solves the shutdown problem since we don't run anymore queries on shutdown.
Attachment #488173 - Flags: review?(jmathies)
Attached patch patch v1.1 (obsolete) — Splinter Review
ehr, better, this is not async so I don't want to call commitBuild.
Assignee: nobody → mak77
Attachment #488173 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #488173 - Flags: review?(jmathies)
Attachment #488174 - Flags: review?(jmathies)
>+ // If history is empty, just clear the list. >+ if (!PlacesUtils.history.hasHistoryEntries) { >+ this._buildCustom(_getString("taskbar.frequent.label"), items); >+ return; >+ } >+ // If history is empty, just clear the list. >+ if (!PlacesUtils.history.hasHistoryEntries) { >+ this._buildCustom(_getString("taskbar.recent.label"), items); >+ return; >+ } I don't think we need the _buildCustom calls. All we want is a task list, the other two list titles shouldn't show up.
(In reply to comment #2) > >+ // If history is empty, just clear the list. > >+ if (!PlacesUtils.history.hasHistoryEntries) { > >+ this._buildCustom(_getString("taskbar.frequent.label"), items); > >+ return; > >+ } > > >+ // If history is empty, just clear the list. > >+ if (!PlacesUtils.history.hasHistoryEntries) { > >+ this._buildCustom(_getString("taskbar.recent.label"), items); > >+ return; > >+ } > > I don't think we need the _buildCustom calls. All we want is a task list, the > other two list titles shouldn't show up. Doesn't look they would do much anyway... http://mxr.mozilla.org/mozilla-central/source/browser/components/wintaskbar/WindowsJumpLists.jsm#341
ah honestly I thought they were calling in _builder. thus a simple early return would do it!
Attached patch patch v1.2Splinter Review
So, we start building a list, if we don't add a custom list to it, it won't just appear since every time we replace everything. This makes sense. The new patch just early returns history lists creation if history is empty, plus fixing the comment from Gavin in the original patch, regarding the use of Object.keys from javascript 1.8.5
Attachment #488174 - Attachment is obsolete: true
Attachment #488371 - Flags: review?(jmathies)
Attachment #488174 - Flags: review?(jmathies)
ehr, this is not blocking was marked like that because I cloned the bug, will need approval.
blocking2.0: betaN+ → ---
Attachment #488371 - Flags: review?(jmathies) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: