Closed Bug 812716 Opened 12 years ago Closed 12 years ago

Desktop Notifications: Race in nsDOMDesktopNotification constructor

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20
blocking-basecamp -
Tracking Status
firefox18 --- fixed
firefox19 --- fixed
firefox20 --- fixed

People

(Reporter: gwagner, Assigned: mrbkap)

Details

Attachments

(1 file)

mrbkap found a race condition when we create the desktop notification object.
Attached patch patchSplinter Review
Assignee: nobody → mrbkap
Comment on attachment 682707 [details] [diff] [review]
patch

I'm not sure that this can actually race, but the early return in the if (!GetOwner()) case can definitely cause crashes. It's pretty hairy to reference count an object in its constructor, so this seems a lot saner in general.
Attachment #682707 - Flags: review?(doug.turner)
Attachment #682707 - Flags: review?(doug.turner) → review+
blocking-basecamp: --- → ?
Note to blocking-basecamp triagers: this is a very low-risk correctness bug that could prevent child-process crashes in certain edge cases.
https://hg.mozilla.org/mozilla-central/rev/9e2d2e78a956
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
basecamp- but please nom for beta if this is really low risk.
blocking-basecamp: ? → -
Comment on attachment 682707 [details] [diff] [review]
patch

[Approval Request Comment]
User impact if declined: In certain rare cases, content processes could crash when sending desktop notifications.
Testing completed (on m-c, etc.): This has been on m-c for a few days.

This patch is extremely low-risk, and is easily provably correct via code inspection.
Attachment #682707 - Flags: approval-mozilla-beta?
Comment on attachment 682707 [details] [diff] [review]
patch

[Triage Comment]
Very low risk fix that may resolve some B2G instability. Approving for branches.
Attachment #682707 - Flags: approval-mozilla-beta?
Attachment #682707 - Flags: approval-mozilla-beta+
Attachment #682707 - Flags: approval-mozilla-aurora+
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: