зеркало из https://github.com/mozilla/pjs.git
bug 100132: clean up over-zealous error masking in
nsRDFXMLDataSource::BlockingParse(), and bring nsLocalFileUnix's OpenNSPRFileDesc() return values in line with other platforms. r=waterson, sr=brendan
This commit is contained in:
Родитель
b43af52bb2
Коммит
710766a6f6
|
@ -560,8 +560,9 @@ RDFXMLDataSourceImpl::BlockingParse(nsIURI* aURL, nsIStreamListener* aConsumer)
|
|||
PRUint32 sourceOffset = 0;
|
||||
rv = channel->Open(&in);
|
||||
|
||||
// If we couldn't open the channel, then just return.
|
||||
if (NS_FAILED(rv)) return NS_OK;
|
||||
// Report success if the file doesn't exist, but propagate other errors.
|
||||
if (rv == NS_ERROR_FILE_NOT_FOUND) return NS_OK;
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
NS_ASSERTION(in != nsnull, "no input stream");
|
||||
if (! in) return NS_ERROR_FAILURE;
|
||||
|
|
|
@ -350,7 +350,7 @@ nsLocalFile::OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc **_retval)
|
|||
|
||||
*_retval = PR_Open(mPath.get(), flags, mode);
|
||||
if (! *_retval)
|
||||
return NS_ERROR_FAILURE;
|
||||
return NS_ErrorAccordingToNSPR();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче