Closed
Bug 463882
Opened 16 years ago
Closed 16 years ago
nsDownloadManager::Init is not safe for multiple calls
Categories
(Toolkit :: Downloads API, defect)
Toolkit
Downloads API
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b3
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
(Keywords: fixed1.9.1)
Attachments
(2 files, 2 obsolete files)
4.71 KB,
patch
|
sdwilsh
:
review+
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
3.68 KB,
patch
|
Details | Diff | Splinter Review |
Bug 457110 made it possible to call nsDownloadManager::Init multiple times to switch the database engine. Some parts of this method are not safe for multiple calls, for example switching the database can cause multiple copies of each observer being registered, which at best can waste memory and processing power, and at worst might manifest itself through other bugs.
The patch is simple enough. We need to take this because any user who switches to/from the private browsing mode is going to trigger this.
Attachment #347135 -
Flags: review?(sdwilsh)
Updated•16 years ago
|
Attachment #347135 -
Flags: review?(sdwilsh) → review-
Comment 1•16 years ago
|
||
Comment on attachment 347135 [details] [diff] [review]
Patch (v1)
I would be more inclined to make a new method that does the database switching work, and keep Init as it is.
Assignee | ||
Comment 2•16 years ago
|
||
OK, I did that in this patch. I made sure that all the unit tests pass successfully with this patch applied.
Attachment #347135 -
Attachment is obsolete: true
Attachment #348051 -
Flags: review?(sdwilsh)
Comment 3•16 years ago
|
||
Comment on attachment 348051 [details] [diff] [review]
Patch (v2)
hg generated a very unuseful patch there...
r=sdwilsh
Attachment #348051 -
Flags: review?(sdwilsh) → review+
Assignee | ||
Updated•16 years ago
|
Attachment #348051 -
Flags: approval1.9.1?
Comment 4•16 years ago
|
||
Comment on attachment 348051 [details] [diff] [review]
Patch (v2)
a191=beltzner
Attachment #348051 -
Flags: approval1.9.1? → approval1.9.1+
Assignee | ||
Comment 5•16 years ago
|
||
Assignee | ||
Comment 6•16 years ago
|
||
Attachment #350511 -
Attachment is obsolete: true
Comment 7•16 years ago
|
||
Please make sure you attach a patch that has the username in it next time. I almost pushed this as me.
http://hg.mozilla.org/mozilla-central/rev/73d9cfe0174c
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b3
Assignee | ||
Updated•16 years ago
|
Attachment #350515 -
Attachment is patch: true
Attachment #350515 -
Attachment mime type: application/octet-stream → text/plain
Updated•16 years ago
|
Keywords: fixed1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•