зеркало из https://github.com/mozilla/pjs.git
Bug 638241. Part 1: remove useless QI. r=bzbarsky
This commit is contained in:
Родитель
f774a0abb0
Коммит
8b3cc384a0
|
@ -83,17 +83,14 @@ 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);
|
||||
aCanvasElement->NodePrincipal()->Subsumes(aPrincipal, &subsumes);
|
||||
|
||||
if (NS_SUCCEEDED(rv) && subsumes) {
|
||||
// This canvas has access to that image anyway
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
aCanvasElement->SetWriteOnly();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче