ProfileUnlockerWin should be robust against target process that terminates during unlock attempt

RESOLVED FIXED in mozilla34

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: aklotz, Assigned: aklotz)

Tracking

Trunk
mozilla34
x86
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

We need to ensure that ProfileUnlockerWin::Unlock is robust if the target process happens to terminate concurrently while it is running. Returning an error code might be bad in some cases for UX reasons.

For example, a user could opt to terminate the "hung" Firefox process, the hung process finally quits, our terminate attempt fails and returns an error code, and then the user has to launch Firefox yet again.

We should return success in cases where we've detected that the process has terminated itself.
This patch essentially adds checks at each point where the unlocker might fail if the target process ends up terminating itself and returns NS_OK if the process is now gone.
Attachment #8477628 - Flags: review?(benjamin)
Attachment #8477628 - Flags: review?(benjamin) → review+
https://hg.mozilla.org/mozilla-central/rev/595c082491e8
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.