Closed
Bug 855556
Opened 12 years ago
Closed 12 years ago
Don't try to send contacts if the child process was killed
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: reuben, Assigned: reuben)
Details
(Whiteboard: [fixed-in-birch])
Attachments
(3 files, 3 obsolete files)
3.27 KB,
patch
|
gwagner
:
review+
|
Details | Diff | Splinter Review |
4.05 KB,
patch
|
gwagner
:
review+
|
Details | Diff | Splinter Review |
3.44 KB,
patch
|
gwagner
:
review+
|
Details | Diff | Splinter Review |
Right now if a getAll call was made and the child process dies, we keep trying to send contacts. We should cancel any ongoing calls to getAll if we see that the child process gets killed.
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #731050 -
Attachment is obsolete: true
Attachment #736724 -
Flags: review?(anygregor)
Comment 3•12 years ago
|
||
Hm the DB code shouldn't care about child processes. Can't we do this in the ContactService where we actually manage the IPC?
Assignee | ||
Comment 4•12 years ago
|
||
It needs some interaction from the DB because it has to know when to stop calling the callback. I tried to make it as loosely coupled as I could by simply catching the exception.
I can move the loop into ContactService, but that would also move some DB logic to the service, and make it harder to understand the program flow when reading the code.
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #736724 -
Attachment is obsolete: true
Attachment #736724 -
Flags: review?(anygregor)
Attachment #740479 -
Flags: review?(anygregor)
Assignee | ||
Comment 6•12 years ago
|
||
Attachment #740480 -
Flags: review?(anygregor)
Updated•12 years ago
|
Attachment #740479 -
Flags: review?(anygregor) → review+
Comment 7•12 years ago
|
||
(In reply to Reuben Morais [:reuben] from comment #4)
> It needs some interaction from the DB because it has to know when to stop
> calling the callback. I tried to make it as loosely coupled as I could by
> simply catching the exception.
>
> I can move the loop into ContactService, but that would also move some DB
> logic to the service, and make it harder to understand the program flow when
> reading the code.
Why do you have to move the loop? You just wrap "mm.sendAsyncMessage" in a try block and call something like db.stopSending(cursorID)
Assignee | ||
Comment 8•12 years ago
|
||
(In reply to Gregor Wagner [:gwagner] from comment #7)
> (In reply to Reuben Morais [:reuben] from comment #4)
> > It needs some interaction from the DB because it has to know when to stop
> > calling the callback. I tried to make it as loosely coupled as I could by
> > simply catching the exception.
> >
> > I can move the loop into ContactService, but that would also move some DB
> > logic to the service, and make it harder to understand the program flow when
> > reading the code.
>
> Why do you have to move the loop? You just wrap "mm.sendAsyncMessage" in a
> try block and call something like db.stopSending(cursorID)
stopSending can't stop the already running function, so it gets messy for stuff like this:
aCallback(chunk);
aCallback(null);
So here I wrap the sendAsyncMessage call in a try-catch, but I also throw the exception. That way, if IPC changes and we have to detect the child process being dead with a different method, only ContactService will need to be changed.
Attachment #740480 -
Attachment is obsolete: true
Attachment #740480 -
Flags: review?(anygregor)
Attachment #740762 -
Flags: review?(anygregor)
Updated•12 years ago
|
Attachment #740762 -
Flags: review?(anygregor) → review+
Assignee | ||
Comment 9•12 years ago
|
||
Contacts is using getAll in v1_0_1, so we should land this fix there as well.
blocking-b2g: --- → tef?
Assignee | ||
Comment 10•12 years ago
|
||
Whiteboard: [fixed-in-birch]
Comment 11•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Updated•12 years ago
|
blocking-b2g: tef? → tef+
Comment 12•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/8434f8bd54bf
https://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/8def3040033b
status-b2g18:
--- → fixed
status-b2g18-v1.0.0:
--- → wontfix
status-b2g18-v1.0.1:
--- → fixed
status-firefox21:
--- → wontfix
status-firefox22:
--- → wontfix
status-firefox23:
--- → fixed
Assignee | ||
Comment 13•12 years ago
|
||
We just caught a bug in ContactDispatcher that is not very visible when running tests, so this patch tests that part of getAll more extensively.
Attachment #742577 -
Flags: review?(anygregor)
Assignee | ||
Updated•12 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•12 years ago
|
Attachment #742577 -
Flags: review?(anygregor) → review+
Assignee | ||
Comment 14•12 years ago
|
||
Assignee | ||
Comment 15•12 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from comment #12)
> https://hg.mozilla.org/releases/mozilla-b2g18/rev/8434f8bd54bf
https://hg.mozilla.org/releases/mozilla-b2g18/rev/c3e641054923
Assignee | ||
Comment 16•12 years ago
|
||
Also, I guess you already backed out v1_0_1:
https://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/296c4c249525
Comment 17•12 years ago
|
||
Assignee | ||
Comment 18•12 years ago
|
||
Landed the third patch on the branches:
https://hg.mozilla.org/releases/mozilla-b2g18/rev/83f0da64373e
https://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/29dbdb5798bf
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Comment 19•12 years ago
|
||
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•