Closed Bug 386768 Opened 14 years ago Closed 14 years ago

Use mozIStorageConnection's BackupDB instead of the current (buggy) one

Categories

(Firefox :: Bookmarks & History, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Firefox 3 beta4

People

(Reporter: sdwilsh, Assigned: sdwilsh)

References

Details

Attachments

(1 file, 1 obsolete file)

Currently, nsNavHistory.cpp has a BackupDB method that doesn't quite work as expected.  It should be changed to use the new method in mozIStorageConnection.
Target Milestone: Firefox 3 M7 → Firefox 3 M8
hrm, this assumes that there's a valid connection object. our use-case in places is when the sqlite file is corrupt, so we don't yet have a valid connection (OpenDatabase fails):

http://mxr.mozilla.org/seamonkey/source/toolkit/components/places/src/nsNavHistory.cpp#465
Hurg!  That's an api flaw I think :/
Target Milestone: Firefox 3 M8 → Firefox 3 M9
Target Milestone: Firefox 3 M9 → Firefox 3 M10
Target Milestone: Firefox 3 M10 → Firefox 3 M11
Target Milestone says M11 (Beta 3); should that be?
Flags: blocking-firefox3?
Target Milestone: Firefox 3 beta3 → Firefox 3 beta4
Assignee: nobody → sdwilsh
Flags: blocking-firefox3? → blocking-firefox3+
Priority: -- → P2
Depends on: 416173
Attached patch v1.0 (obsolete) — Splinter Review
Hey...this was a lot more difficult than originally expected.

I ended up adding an invariant to InitDBFile, but it already existed before.
Attachment #301993 - Flags: review?(dietrich)
Whiteboard: [has patch][needs review dietrich]
Comment on attachment 301993 [details] [diff] [review]
v1.0


> // nsNavHistory::InitDBFile
> nsresult
> nsNavHistory::InitDBFile(PRBool aForceInit)
> {
>+  if (aForceInit) {
>+    NS_ASSERTION(mDBConn,
>+                 "When forcing initialization, a database connection must exists!");
>+  }
>+

nit: s/exists/exist/

r=me, thanks!
Attachment #301993 - Flags: review?(dietrich) → review+
Attached patch v1.1Splinter Review
(In reply to comment #5)
> nit: s/exists/exist/
Also documented this in the header file.

This is for checkin.
Attachment #301993 - Attachment is obsolete: true
Whiteboard: [has patch][needs review dietrich] → [has patch][has review][can land]
Checking in toolkit/components/places/src/nsNavHistory.cpp;
new revision: 1.246; previous revision: 1.245
Checking in toolkit/components/places/src/nsNavHistory.h;
new revision: 1.136; previous revision: 1.135
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite?
Flags: in-litmus-
Resolution: --- → FIXED
Whiteboard: [has patch][has review][can land]
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.