Closed Bug 1057466 Opened 7 years ago Closed 7 years ago

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

Categories

(Toolkit :: Startup and Profile System, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: aklotz, Assigned: aklotz)

Details

Attachments

(1 file)

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: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.