mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 412530 - "context.restore throws exception if no saved state instead of doing nothing per spec" [p=taken.spc@gmail.com (KUROSAWA, Takeshi) r+a1.9=vlad]
This commit is contained in:
parent
9e74d0068b
commit
171889e6bc
@ -827,7 +827,9 @@ nsCanvasRenderingContext2D::Save()
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsCanvasRenderingContext2D::Restore()
|
nsCanvasRenderingContext2D::Restore()
|
||||||
{
|
{
|
||||||
if (mSaveCount <= 0)
|
if (mSaveCount == 0)
|
||||||
|
return NS_OK;
|
||||||
|
if (mSaveCount < 0)
|
||||||
return NS_ERROR_DOM_INVALID_STATE_ERR;
|
return NS_ERROR_DOM_INVALID_STATE_ERR;
|
||||||
|
|
||||||
mStyleStack.RemoveElementAt(mSaveCount);
|
mStyleStack.RemoveElementAt(mSaveCount);
|
||||||
|
Loading…
Reference in New Issue
Block a user