Closed
Bug 641531
Opened 14 years ago
Closed 14 years ago
Close Places containers after use
Categories
(Firefox :: Sync, defect)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
People
(Reporter: rnewman, Assigned: mak)
References
Details
(Whiteboard: [fixed-in-places])
Attachments
(3 files, 1 obsolete file)
(deleted),
patch
|
mak
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
sdwilsh
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
philikon
:
review+
|
Details | Diff | Splinter Review |
Per mak:
> > OT: I see the node.containerOpen = true, but where is the
> > corresponding call to node.containerOpen = false?
>
> As far as I can see, there are no such calls in the Sync codebase.
File a bug in Sync please, any container opened that is not needed for caching
purposes (so unless you use it to track changes) should be explicitly closed.
Not doing so causes the result's observers to stay alive, till it is cycle
collected, that could be much later, these observers can regress global
performances.
Assignee | ||
Comment 1•14 years ago
|
||
there are other entries I'd like to fix around too. So taking.
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•14 years ago
|
||
I'll self review this part, it's plain mechanical changes to tests, will assume r+ once I get a green try.
Attachment #527704 -
Flags: review?(mak77)
Assignee | ||
Comment 3•14 years ago
|
||
Attachment #527705 -
Flags: review?(philipp)
Assignee | ||
Comment 4•14 years ago
|
||
minor change to browser code
Attachment #527706 -
Flags: review?(sdwilsh)
Reporter | ||
Comment 5•14 years ago
|
||
Comment on attachment 527705 [details] [diff] [review]
sync fixes
Looks good, tests pass... but please wrap code in try .. finally. E.g.,
// Remember all the children GUIDs and recursively get more
try {
for (let i = 0; i < node.childCount; i++) {
let child = node.getChild(i);
items[this.GUIDForId(child.itemId)] = true;
this._getChildren(child, items);
}
} finally {
node.containerOpen = false;
}
We've already seen that apparently simple operations like GUID fetching can throw, which means the cleanup code isn't run.
Assignee | ||
Comment 6•14 years ago
|
||
now with more try/finally!
Attachment #527705 -
Attachment is obsolete: true
Attachment #527705 -
Flags: review?(philipp)
Attachment #527766 -
Flags: review?(philipp)
Comment 7•14 years ago
|
||
Comment on attachment 527706 [details] [diff] [review]
browser change
r=sdwilsh
Attachment #527706 -
Flags: review?(sdwilsh) → review+
Assignee | ||
Comment 8•14 years ago
|
||
Comment on attachment 527704 [details] [diff] [review]
tests fixes
try was fine, the only failure was due to other stuff, so r+ on mechanical changes, will land first on Places btw.
Attachment #527704 -
Flags: review?(mak77) → review+
Updated•14 years ago
|
Attachment #527766 -
Flags: review?(philipp) → review+
Assignee | ||
Comment 9•14 years ago
|
||
http://hg.mozilla.org/projects/places/rev/c87e47e6ca8c
http://hg.mozilla.org/projects/places/rev/7bc382705bc7
http://hg.mozilla.org/projects/places/rev/80793bce352a
Whiteboard: [fixed-in-places]
Assignee | ||
Comment 10•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/c87e47e6ca8c
http://hg.mozilla.org/mozilla-central/rev/7bc382705bc7
http://hg.mozilla.org/mozilla-central/rev/80793bce352a
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in
before you can comment on or make changes to this bug.
Description
•