Closed Bug 735968 Opened 13 years ago Closed 13 years ago

PlacesUtils.history must be QI-ed before using nsPIPlacesDatabase methods

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: bholley, Assigned: bholley)

References

Details

Attachments

(1 file)

We were getting lucky before compartment-per-global, but now it's broken. The lazy getter only QIs to nsINavHistoryService: http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/PlacesUtils.jsm#2205 Attaching a patch. Flagging philikon for review. Is there anywhere where this might crop up in non-test code? We _could_ always make the service getter non-lazy and explicitly QI it, but that seems ugly.
Attached patch patch. v1Splinter Review
Attachment #606080 - Flags: review?(philipp)
(FWIW this is time-sensitive, so please let me know right away if I guessed the wrong reviewer).
The module code itself does the right thing: modules/engines/history.js 112: let db = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
Comment on attachment 606080 [details] [diff] [review] patch. v1 Review of attachment 606080 [details] [diff] [review]: ----------------------------------------------------------------- This looks OK to me.
Attachment #606080 - Flags: review?(philipp) → review+
Target Milestone: --- → mozilla14
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: