CookieServiceChild doesn't receive preference observer notifications

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: jdm, Assigned: jdm)

Tracking

unspecified
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(fennec2.0b4+)

Details

Attachments

(1 attachment, 2 obsolete attachments)

From CookieServiceChild::CookieServiceChild:

>  prefBranch->AddObserver(kPrefCookieBehavior, this, PR_TRUE);
>  prefBranch->AddObserver(kPrefThirdPartySession, this, PR_TRUE);

PR_TRUE in this case means that we want a weak observer, but CookieServiceChild doesn't support weak references.
tracking-fennec: --- → ?
Attachment #494232 - Flags: review?(dwitte)
(In reply to comment #0)
> PR_TRUE in this case means that we want a weak observer, but CookieServiceChild
> doesn't support weak references.
Eh, why doesn't it support weak references?
Comment on attachment 494232 [details] [diff] [review]
Make CookieServiceChild add strong pref observers.

This would leak.  If we register them, we need to unregister them at the right times (which is why we use weak references in the first place; we don't need to worry about it)
Attachment #494232 - Flags: review?(dwitte) → review-
Attachment #494232 - Attachment is obsolete: true
Attachment #494279 - Flags: review?(dwitte)
Comment on attachment 494279 [details] [diff] [review]
Make CookieServiceChild add strong pref observers.

I am dumb; nevermind.
Attachment #494279 - Flags: review?(dwitte)
Attachment #494279 - Attachment is obsolete: true
Attachment #494281 - Attachment description: Make CookieServiceChild add strong pref observers. → Make CookieServiceChild support weak references.
tracking-fennec: ? → 2.0b4+
Assignee: nobody → josh
Comment on attachment 494281 [details] [diff] [review]
Make CookieServiceChild support weak references.

r=dwitte
Attachment #494281 - Flags: review?(dwitte) → review+
pushed http://hg.mozilla.org/mozilla-central/rev/e65c1b9d95fb
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.