зеркало из https://github.com/mozilla/gecko-dev.git
Bug 638241. Part 1: remove useless QI. r=bzbarsky
This commit is contained in:
Родитель
d9388b1aa4
Коммит
8b2458e7bd
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче