mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-01 11:27:55 +00:00
fix topcrasher bug 252289, r=mvl sr=darin
This commit is contained in:
parent
e3915ea7f5
commit
4fb8109457
@ -499,6 +499,8 @@ NS_IMETHODIMP
|
||||
nsSafeFileOutputStream::Init(nsIFile* file, PRInt32 ioFlags, PRInt32 perm,
|
||||
PRInt32 behaviorFlags)
|
||||
{
|
||||
NS_ENSURE_ARG(file);
|
||||
|
||||
nsresult rv = file->Exists(&mTargetFileExists);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ERROR("Can't tell if target file exists");
|
||||
|
@ -162,6 +162,7 @@ public:
|
||||
NS_DECL_NSISAFEOUTPUTSTREAM
|
||||
|
||||
nsSafeFileOutputStream() :
|
||||
mTargetFileExists(PR_TRUE),
|
||||
mWriteResult(NS_OK) {}
|
||||
|
||||
virtual ~nsSafeFileOutputStream() { nsSafeFileOutputStream::Close(); }
|
||||
|
@ -1034,6 +1034,10 @@ nsCookieService::Write()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!mCookieFile) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIOutputStream> fileOutputStream;
|
||||
rv = NS_NewSafeLocalFileOutputStream(getter_AddRefs(fileOutputStream),
|
||||
|
Loading…
x
Reference in New Issue
Block a user