Bug 789904 - QuerySelector doesn't set result to null on successful call with no matches r=bz

This commit is contained in:
Jacek Caban 2012-09-10 14:57:17 +02:00
parent e59f49d26f
commit 745d58d22b

View File

@ -2071,7 +2071,12 @@ nsNodeSelectorTearoff::QuerySelector(const nsAString& aSelector,
{
nsresult rv;
nsIContent* result = mNode->QuerySelector(aSelector, &rv);
return result ? CallQueryInterface(result, aReturn) : rv;
if (!result) {
*aReturn = nullptr;
return rv;
}
return CallQueryInterface(result, aReturn);
}
NS_IMETHODIMP