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

RESOLVED FIXED in mozilla1.9beta4

Status

()

Toolkit
Downloads API
P1
normal
RESOLVED FIXED
11 years ago
8 years ago

People

(Reporter: sdwilsh, Assigned: sdwilsh)

Tracking

Trunk
mozilla1.9beta4
Points:
---
Bug Flags:
blocking1.9 +
in-testsuite -
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.45 KB, patch
Mike Schroepfer
: approval1.9+
Details | Diff | Splinter Review
(Assignee)

Description

11 years ago
See bug 416173
Flags: blocking-firefox3?
(Assignee)

Comment 1

11 years ago
Created attachment 301981 [details] [diff] [review]
v1.0
Assignee: nobody → sdwilsh
Status: NEW → ASSIGNED
Attachment #301981 - Flags: review?(edilee)
(Assignee)

Updated

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

Comment 3

11 years ago
Created attachment 301995 [details] [diff] [review]
v1.1

(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?
(Assignee)

Updated

11 years ago
Whiteboard: [has patch][has reviews] → [has patch][has review][needs approval]

Updated

11 years ago
Attachment #301995 - Flags: approval1.9? → approval1.9+
(Assignee)

Updated

11 years ago
Whiteboard: [has patch][has review][needs approval] → [has patch][has review][has approval][can land]
Flags: blocking-firefox3? → blocking-firefox3+
(Assignee)

Comment 4

11 years ago
Checking in toolkit/components/downloads/src/nsDownloadManager.cpp;
new revision: 1.162; previous revision: 1.161
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Flags: in-testsuite?
Flags: in-litmus-
Resolution: --- → FIXED
Whiteboard: [has patch][has review][has approval][can land]
(Assignee)

Comment 5

10 years ago
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.