Bug 638241. Part 1: remove useless QI. r=bzbarsky

This commit is contained in:
Robert O'Callahan 2011-03-24 16:13:18 +13:00
Родитель f774a0abb0
Коммит 8b3cc384a0
1 изменённых файлов: 7 добавлений и 10 удалений

Просмотреть файл

@ -83,16 +83,13 @@ CanvasUtils::DoDrawImageSecurityCheck(nsHTMLCanvasElement *aCanvasElement,
if (aPrincipal == nsnull)
return;
nsCOMPtr<nsINode> elem = do_QueryInterface(static_cast<nsIDOMHTMLCanvasElement*>(aCanvasElement));
if (elem) { // XXXbz How could this actually be null?
PRBool subsumes;
nsresult rv =
elem->NodePrincipal()->Subsumes(aPrincipal, &subsumes);
if (NS_SUCCEEDED(rv) && subsumes) {
// This canvas has access to that image anyway
return;
}
PRBool subsumes;
nsresult rv =
aCanvasElement->NodePrincipal()->Subsumes(aPrincipal, &subsumes);
if (NS_SUCCEEDED(rv) && subsumes) {
// This canvas has access to that image anyway
return;
}
aCanvasElement->SetWriteOnly();