CookieServiceChild doesn't receive preference observer notifications

RESOLVED FIXED

Status

()

RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: jdm, Assigned: jdm)

Tracking

unspecified
x86
macOS
Points:
---

Firefox Tracking Flags

(fennec2.0b4+)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

8 years ago
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.
(Assignee)

Updated

8 years ago
tracking-fennec: --- → ?
(Assignee)

Comment 1

8 years ago
Created attachment 494232 [details] [diff] [review]
Make CookieServiceChild add strong pref observers.
(Assignee)

Updated

8 years ago
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-
(Assignee)

Updated

8 years ago
Attachment #494232 - Attachment is obsolete: true
(Assignee)

Comment 4

8 years ago
Created attachment 494279 [details] [diff] [review]
Make CookieServiceChild add strong pref observers.
Attachment #494279 - Flags: review?(dwitte)
(Assignee)

Comment 5

8 years ago
Comment on attachment 494279 [details] [diff] [review]
Make CookieServiceChild add strong pref observers.

I am dumb; nevermind.
Attachment #494279 - Flags: review?(dwitte)
(Assignee)

Updated

8 years ago
Attachment #494279 - Attachment is obsolete: true
(Assignee)

Comment 6

8 years ago
Created attachment 494281 [details] [diff] [review]
Make CookieServiceChild support weak references.
Attachment #494281 - Flags: review?(dwitte)
(Assignee)

Updated

8 years ago
Attachment #494281 - Attachment description: Make CookieServiceChild add strong pref observers. → Make CookieServiceChild support weak references.
tracking-fennec: ? → 2.0b4+
Assignee: nobody → josh

Comment 7

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