Bug 984466 - change CallQueryInterface to assert in cases of trivial conversions; r=ehsan

This commit is contained in:
Nathan Froyd
2014-03-17 13:00:17 -04:00
parent b788024a9a
commit c8acba35ef
13 changed files with 69 additions and 35 deletions

View File

@@ -1370,9 +1370,12 @@ nsLocalFile::GetParent(nsIFile **aParent)
// make buffer whole again
*slashp = c;
if (NS_SUCCEEDED(rv) && localFile)
rv = CallQueryInterface(localFile, aParent);
return rv;
if (NS_FAILED(rv)) {
return rv;
}
localFile.forget(aParent);
return NS_OK;
}
/*