Closed Bug 835355 Opened 9 years ago Closed 9 years ago

ContentPrefService2.QueryInterface() returns the wrong value when queried for both nsIContentPrefService2 and nsIContentPrefService

Categories

(Toolkit :: Preferences, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: gsvelto, Assigned: gsvelto)

Details

Attachments

(1 file)

See the code in ContentPrefService2.jsm:

https://mxr.mozilla.org/mozilla-central/source/toolkit/components/contentprefs/ContentPrefService2.jsm#723

QueryInterface() returns an object implementing nsIContentPrefService2 when queried for nsIContentPrefService and throws an exception when queried for nsIContentPrefService2.
This is a one-line fix to the bug. I don't think it would be worth adding a test-case for this but I should be able to provide one easily if need be. I'll submit to try as soon as mozilla-central re-opens.
Assignee: nobody → gsvelto
Status: NEW → ASSIGNED
Attachment #707063 - Flags: review?(mak77)
Comment on attachment 707063 [details] [diff] [review]
Fix ContentPrefService2 to properly respond to queries for nsIContentPrefService and nsIContentPrefService2 interfaces

Review of attachment 707063 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks
Attachment #707063 - Flags: review?(mak77) → review+
Thank you! Try run is all green, asking for checkin:

https://tbpl.mozilla.org/?tree=Try&rev=362c3211a6b5
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f370ad0944a2
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.