Get out as early as possible if we know we're unconditionally setting writeOnly (bug 354127) r/sr=vlad, a=schrep

This commit is contained in:
dveditz%cruzio.com 2006-09-27 08:43:25 +00:00
Родитель fd5d0991c5
Коммит 578219f4b6
1 изменённых файлов: 6 добавлений и 3 удалений

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

@ -628,14 +628,17 @@ nsCanvasRenderingContext2D::DoDrawImageSecurityCheck(nsIURI* aURI, PRBool forceW
if (mCanvasElement->IsWriteOnly())
return;
if (!aURI)
return;
// If we explicitly set WriteOnly just do it and get out
if (forceWriteOnly) {
mCanvasElement->SetWriteOnly();
return;
}
// Further security checks require a URI. If we don't have one the image
// must be another canvas and we inherit the forceWriteOnly state
if (!aURI)
return;
nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
#ifdef MOZILLA_1_8_BRANCH