mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-01 05:43:46 +00:00
Only answer questions with positive assertions.
This commit is contained in:
parent
2c90d6f07f
commit
b8c6ad0745
@ -315,6 +315,10 @@ FileSystemDataSource::GetTargets(nsIRDFResource *source,
|
||||
nsVoidArray *array = nsnull;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
// we only have positive assertions in the file system data source.
|
||||
if (! tv)
|
||||
return rv;
|
||||
|
||||
if (peq(source, kNC_FileSystemRoot))
|
||||
{
|
||||
if (peq(property, kNC_Child))
|
||||
@ -397,6 +401,10 @@ FileSystemDataSource::HasAssertion(nsIRDFResource *source,
|
||||
PRBool retVal = PR_FALSE;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
// we only have positive assertions in the file system data source.
|
||||
if (! tv)
|
||||
return rv;
|
||||
|
||||
*hasAssertion = PR_FALSE;
|
||||
if (peq(source, kNC_FileSystemRoot) || isFileURI(source))
|
||||
{
|
||||
|
@ -422,6 +422,10 @@ FindDataSource::GetTargets(nsIRDFResource *source,
|
||||
nsVoidArray *array = nsnull;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
// we only have positive assertions in the find data source.
|
||||
if (! tv)
|
||||
return rv;
|
||||
|
||||
if (isFindURI(source))
|
||||
{
|
||||
if (peq(property, kNC_Child))
|
||||
@ -493,6 +497,10 @@ FindDataSource::HasAssertion(nsIRDFResource *source,
|
||||
PRBool retVal = PR_FALSE;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
// we only have positive assertions in the find data source.
|
||||
if (! tv)
|
||||
return rv;
|
||||
|
||||
*hasAssertion = PR_FALSE;
|
||||
if (isFindURI(source))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user