diff --git a/xpfe/components/download-manager/src/nsDownloadManager.cpp b/xpfe/components/download-manager/src/nsDownloadManager.cpp index f19758626bba..113c522c6425 100644 --- a/xpfe/components/download-manager/src/nsDownloadManager.cpp +++ b/xpfe/components/download-manager/src/nsDownloadManager.cpp @@ -312,6 +312,8 @@ nsDownloadManager::AddDownload(nsIDownloadItem* aDownloadItem) nsresult rv = GetDownloadsContainer(getter_AddRefs(downloads)); if (NS_FAILED(rv)) return rv; + // such assumptions are pretty much okay because the client presumably used + // createDownload to create the download item, which creates a new instance of DownloadItem DownloadItem* item = NS_STATIC_CAST(DownloadItem*, aDownloadItem); item->SetDownloadManager(this); diff --git a/xpfe/components/download-manager/src/nsDownloadManager.h b/xpfe/components/download-manager/src/nsDownloadManager.h index 3c7ec9559dfb..73f8653b509c 100644 --- a/xpfe/components/download-manager/src/nsDownloadManager.h +++ b/xpfe/components/download-manager/src/nsDownloadManager.h @@ -109,7 +109,6 @@ protected: nsresult GetDialogListener(nsIWebProgressListener** aInternalListener); private: - nsIRDFDataSource* mDataSource; nsDownloadManager* mDownloadManager; nsString mPrettyName; diff --git a/xpfe/components/download-manager/src/nsDownloadProgressListener.js b/xpfe/components/download-manager/src/nsDownloadProgressListener.js index fefef1c3c552..b8f6f1480554 100644 --- a/xpfe/components/download-manager/src/nsDownloadProgressListener.js +++ b/xpfe/components/download-manager/src/nsDownloadProgressListener.js @@ -61,7 +61,6 @@ nsDownloadProgressListener.prototype = { { if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) { - this.downloadItem = null; // we are done downloading... // Indicate completion in status area. var msg = getString( "completeMsg", this.doc );