Tweak for chrome registry: don't hard-fail if stream cannot be opened. Allows creation of new RDF/XML datasources. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@54164 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
3be554e7b5
commit
07a5141e0d
@ -571,20 +571,14 @@ rdf_BlockingParse(nsIURI* aURL, nsIStreamListener* aConsumer)
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
// Null LoadGroup ?
|
||||
rv = NS_OpenURI(getter_AddRefs(channel), aURL, nsnull);
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
NS_ERROR("unable to open channel");
|
||||
return rv;
|
||||
}
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsIInputStream* in;
|
||||
PRUint32 sourceOffset = 0;
|
||||
rv = channel->OpenInputStream(0, -1, &in);
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
// file doesn't exist -- just exit
|
||||
// NS_ERROR("unable to open blocking stream");
|
||||
return rv;
|
||||
}
|
||||
|
||||
// If we couldn't open the channel, then just return.
|
||||
if (NS_FAILED(rv)) return NS_OK;
|
||||
|
||||
NS_ASSERTION(in != nsnull, "no input stream");
|
||||
if (! in) return NS_ERROR_FAILURE;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user