зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1036056 - Remove dangerous public destructor of nsFileUploadContentStream r=mcmanus
This commit is contained in:
Родитель
94e53dc0be
Коммит
972e966190
|
@ -178,20 +178,14 @@ public:
|
|||
uint32_t count, nsIEventTarget *target);
|
||||
|
||||
private:
|
||||
virtual ~nsFileUploadContentStream() {}
|
||||
|
||||
void OnCopyComplete();
|
||||
|
||||
nsRefPtr<nsFileCopyEvent> mCopyEvent;
|
||||
nsCOMPtr<nsITransportEventSink> mSink;
|
||||
};
|
||||
|
||||
namespace mozilla {
|
||||
template<>
|
||||
struct HasDangerousPublicDestructor<nsFileUploadContentStream>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED0(nsFileUploadContentStream,
|
||||
nsBaseContentStream)
|
||||
|
||||
|
@ -365,14 +359,13 @@ nsFileChannel::OpenContentStream(bool async, nsIInputStream **result,
|
|||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
nsFileUploadContentStream *uploadStream =
|
||||
nsRefPtr<nsFileUploadContentStream> uploadStream =
|
||||
new nsFileUploadContentStream(async, fileStream, mUploadStream,
|
||||
mUploadLength, this);
|
||||
if (!uploadStream || !uploadStream->IsInitialized()) {
|
||||
delete uploadStream;
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
stream = uploadStream;
|
||||
stream = uploadStream.forget();
|
||||
|
||||
mContentLength = 0;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче