зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
fd5d0991c5
Коммит
578219f4b6
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче