Closed Bug 416205 Opened 16 years ago Closed 16 years ago

Update nsDownloadManager::Init from changes to mozIStorageService::OpenDatabase

Categories

(Toolkit :: Downloads API, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9beta4

People

(Reporter: sdwilsh, Assigned: sdwilsh)

References

Details

Attachments

(1 file, 1 obsolete file)

See bug 416173
Flags: blocking-firefox3?
Attached patch v1.0 (obsolete) — Splinter Review
Assignee: nobody → sdwilsh
Status: NEW → ASSIGNED
Attachment #301981 - Flags: review?(edilee)
Priority: -- → P1
Whiteboard: [has patch][needs review Mardak]
Comment on attachment 301981 [details] [diff] [review]
v1.0

r=Mardak

>+    // delete and try again, since we don't care so much about losing a users
>+    // download history
Aww.. ;) Are we sure that the only situation we would have a "not ready" is if OpenDatabase would have returned NS_ERROR_FILE_CORRUPTED?

>-    rv = dbFile->Remove(PR_TRUE);
>+    rv = dbFile->Remove(PR_FALSE);
:)

>     NS_ENSURE_SUCCESS(rv, rv);
>     rv = storage->OpenDatabase(dbFile, getter_AddRefs(mDBConn));

>+    (void)mDBConn->GetConnectionReady(&ready);
>+    if (!ready) return NS_ERROR_UNEXPECTED;
nit: Your call if you want that on the same line. The only other places in nsDownloadManager that has same line if/return is for if (NS_FAILED(rv)) return rv; in CreateTable and GetTargetFile.
Attachment #301981 - Flags: review?(edilee) → review+
Whiteboard: [has patch][needs review Mardak] → [has patch][has reviews]
Attached patch v1.1Splinter Review
(In reply to comment #2)
> Aww.. ;) Are we sure that the only situation we would have a "not ready" is if
> OpenDatabase would have returned NS_ERROR_FILE_CORRUPTED?
Yes, actually.

> nit: Your call if you want that on the same line. The only other places in
> nsDownloadManager that has same line if/return is for if (NS_FAILED(rv)) return
> rv; in CreateTable and GetTargetFile.
fair
Attachment #301981 - Attachment is obsolete: true
Attachment #301995 - Flags: approval1.9?
Whiteboard: [has patch][has reviews] → [has patch][has review][needs approval]
Attachment #301995 - Flags: approval1.9? → approval1.9+
Whiteboard: [has patch][has review][needs approval] → [has patch][has review][has approval][can land]
Flags: blocking-firefox3? → blocking-firefox3+
Checking in toolkit/components/downloads/src/nsDownloadManager.cpp;
new revision: 1.162; previous revision: 1.161
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite?
Flags: in-litmus-
Resolution: --- → FIXED
Whiteboard: [has patch][has review][has approval][can land]
This change was reverted - no longer needs to be in the testsuite
Flags: in-testsuite? → in-testsuite-
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: