Closed
Bug 228388
Opened 21 years ago
Closed 21 years ago
nsDownloadManager cleanup
Categories
(SeaMonkey :: Download & File Handling, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.7alpha
People
(Reporter: Biesinger, Assigned: Biesinger)
References
Details
Attachments
(1 file, 4 obsolete files)
16.09 KB,
patch
|
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
avoid some QIs; don't use Exists on a hashtable when we will call Get anyway (if the entry exists)
Assignee | ||
Comment 1•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #137367 -
Flags: review?(neil.parkwaycc.co.uk)
Comment 2•21 years ago
|
||
Comment on attachment 137367 [details] [diff] [review] patch >+ *aDownloadItem = NS_STATIC_CAST(nsIDownload*, mCurrDownloads.Get(&key)); Should be nsDownload* >- nsDownload* internalDownload = NS_STATIC_CAST(nsDownload*, mCurrDownloads.Get(&key)); >+ nsDownload* download = NS_STATIC_CAST(nsDownload*, mCurrDownloads.Get(&key)); Why the rename? You didn't rename it above. >-nsDownloadManager::OpenProgressDialogFor(const nsACString & aTargetPath, nsIDOMWindow* aParent, PRBool aCancelDownloadOnClose) >+nsDownloadManager::OpenProgressDialogFor(nsIDownload* aDownload, nsIDOMWindow* aParent, PRBool aCancelDownloadOnClose) This change makes the patch incomplete. >+ nsDownload* internalDownload = NS_STATIC_CAST(nsDownload*, aDownload); Null check please.
Attachment #137367 -
Flags: review?(neil.parkwaycc.co.uk) → review-
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•21 years ago
|
||
new version of the patch requires nsInterfaceHashtable::GetWeak, marking dependency
Depends on: 228794
Target Milestone: --- → mozilla1.7alpha
Assignee | ||
Comment 4•21 years ago
|
||
Attachment #137367 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #138079 -
Flags: review?(neil.parkwaycc.co.uk)
Assignee | ||
Comment 5•21 years ago
|
||
Comment on attachment 138079 [details] [diff] [review] patch v2 oops, the point of nsInterfaceHashtable was to avoid manual refcounting. I forgot to remove the manual refcounting in this patch though...
Attachment #138079 -
Flags: review?(neil.parkwaycc.co.uk) → review-
Assignee | ||
Comment 6•21 years ago
|
||
let the hashtable do the refcounting
Attachment #138079 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #138083 -
Flags: review?(neil.parkwaycc.co.uk)
Assignee | ||
Comment 7•21 years ago
|
||
*** Bug 228825 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 8•21 years ago
|
||
Comment on attachment 138083 [details] [diff] [review] patch v3 I'll make this use the new nsReferenceHashtable
Attachment #138083 -
Flags: review?(neil.parkwaycc.co.uk) → review-
Assignee | ||
Comment 9•21 years ago
|
||
Attachment #138083 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #140308 -
Flags: review?(neil.parkwaycc.co.uk)
Comment 10•21 years ago
|
||
Comment on attachment 140308 [details] [diff] [review] patch v4 >+#include "nsAutoPtr.h" The code compiles without this... > /* Outstanding issues/todo: > * 1. Implement pause/resume. > */ Is this still true? >+ mCurrDownloads.Remove(utf8Path); I don't think this is necessary, in fact I think it hurts (but double-check with bsmedberg or alecf just to be sure). >+ mCurrDownloads.Put(utf8Path, internalDownload);
Attachment #140308 -
Flags: review?(neil.parkwaycc.co.uk) → review+
Assignee | ||
Comment 11•21 years ago
|
||
(In reply to comment #10) > (From update of attachment 140308 [details] [diff] [review]) > >+#include "nsAutoPtr.h" > The code compiles without this... Ah yeah... it gets nsRefPtr via nsRefPtrHashtable.h. I'll remove this line > > /* Outstanding issues/todo: > > * 1. Implement pause/resume. > > */ > Is this still true? it is... > >+ mCurrDownloads.Remove(utf8Path); > I don't think this is necessary, in fact I think it hurts (but double-check > with bsmedberg or alecf just to be sure). yes, bsmedberg confirmed this is not necessary. I'll remove this line.
Assignee | ||
Comment 12•21 years ago
|
||
Attachment #140308 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #140311 -
Flags: superreview?(bz-vacation)
Comment 13•21 years ago
|
||
Comment on attachment 140311 [details] [diff] [review] v4 with neil's comments sr=bzbarsky
Attachment #140311 -
Flags: superreview?(bzbarsky) → superreview+
Assignee | ||
Comment 14•21 years ago
|
||
Checking in xpfe/components/download-manager/src/nsDownloadManager.cpp; /cvsroot/mozilla/xpfe/components/download-manager/src/nsDownloadManager.cpp,v <-- nsDownloadManager.cpp new revision: 1.90; previous revision: 1.89 done Checking in xpfe/components/download-manager/src/nsDownloadManager.h; /cvsroot/mozilla/xpfe/components/download-manager/src/nsDownloadManager.h,v <-- nsDownloadManager.h new revision: 1.30; previous revision: 1.29 done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•