Closed
Bug 871872
Opened 12 years ago
Closed 12 years ago
Clean up ContactDB temporary cache if the child dies without asking for more contacts.
Categories
(Core :: DOM: Device Interfaces, defect)
Core
DOM: Device Interfaces
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: reuben, Assigned: reuben)
References
Details
(Whiteboard: [fixed-in-birch])
Attachments
(1 file, 2 obsolete files)
7.01 KB,
patch
|
gwagner
:
review+
|
Details | Diff | Splinter Review |
Right now if the child receives a chunk and doesn't use it or call continue() again, we keep the dispatcher around in the parent. We should clean that up when the child dies.
Assignee | ||
Comment 1•12 years ago
|
||
So because we moved to using DOMRequestIpcHelper for cursors in bug 862351, we don't have a list of cursors in the child anymore, and that's the reason for the DOMRequestHelper.jsm changes here. I could also keep that list in ContactManager, if that's preferred.
Attachment #749151 -
Flags: review?(anygregor)
Assignee | ||
Comment 2•12 years ago
|
||
Looking green on Try, FWIW: https://tbpl.mozilla.org/?tree=Try&rev=582dedf62c9e
Comment 3•12 years ago
|
||
Hm no we should just fix this in the case "child-process-shutdown" call.
Calling cleanup from the child when the child just crashed doesn't work :)
Assignee | ||
Comment 4•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Attachment #749151 -
Attachment is obsolete: true
Attachment #749151 -
Flags: review?(anygregor)
Assignee | ||
Comment 5•12 years ago
|
||
Tested manually on the device, since we have leakcheck disabled in B2G tests.
Attachment #751272 -
Flags: review?(anygregor)
Comment 6•12 years ago
|
||
I would prefer if we don't have to queue up all cursorIDs until we shut down the app.
How about moving the successCallback of sendNow into ContactsService and do a proper cursorID deletion when we are done with a cursor?
Assignee | ||
Comment 7•12 years ago
|
||
As discussed on IRC.
Attachment #751272 -
Attachment is obsolete: true
Attachment #751272 -
Flags: review?(anygregor)
Attachment #751925 -
Flags: review?(anygregor)
Comment 8•12 years ago
|
||
Comment on attachment 751925 [details] [diff] [review]
Clean up existing cursors on child process shutdown
Review of attachment 751925 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/contacts/fallback/ContactService.jsm
@@ +111,5 @@
> try {
> mm.sendAsyncMessage("Contacts:GetAll:Next", {cursorId: msg.cursorId, contacts: aContacts});
> + if (aContacts === null) {
> + let index = this._cursors[mm].indexOf(msg.cursorId);
> + this._cursors[mm].splice(msg.cursorId, 1);
that doesn't work.
Assignee | ||
Comment 9•12 years ago
|
||
Sigh, pretend that's splice(index, 1), I attached the patch from the wrong tree.
Comment 10•12 years ago
|
||
Comment on attachment 751925 [details] [diff] [review]
Clean up existing cursors on child process shutdown
Review of attachment 751925 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/contacts/fallback/ContactDB.jsm
@@ +693,5 @@
> }
> },
>
> + clearDispatcher: function CDB_clearDispatcher(aCursorId) {
> + debug("clearDispatcher: " + aCursorId);
if (DEBUG) ....
::: dom/contacts/tests/test_contacts_getall.html
@@ +444,5 @@
> + } else {
> + ok(true, "All done!\n");
> + SimpleTest.finish();
> + }
> +}
Please don't change this.
Attachment #751925 -
Flags: review?(anygregor) → review+
Assignee | ||
Comment 11•12 years ago
|
||
Whiteboard: [fixed-in-birch]
Comment 12•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•