Bug 745818. Ignore invalid cairo surfaces. r=bas, a=blassey

With bug 686453, we're not really supposed to get NULL surfaces
anymore. Instead we get Invalid ones that we should still ignore.

--HG--
extra : rebase_source : eee8213c897c01508815a810436d1e04e133f752
This commit is contained in:
Jeff Muizelaar 2012-04-23 17:03:36 -04:00
parent ac12f9bd6f
commit 11ae79aaf3
3 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<script>
function boom()
{
var a = document.getElementById("a");
var b = document.getElementById("b");
a.getContext('2d').createPattern(b, 'no-repeat');
}
</script>
</head>
<body onload="boom();">
<canvas id="a" width="61" height="26"></canvas>
<canvas id="b" width="611" height="439807"></canvas>
</body>
</html>

View File

@ -6,3 +6,4 @@ load 0px-size-font-667225.html
load texImage2D.html
load 729116.html
load 745699-1.html
load 745818-large-source.html

View File

@ -1973,7 +1973,7 @@ nsCanvasRenderingContext2DAzure::CreatePattern(nsIDOMHTMLElement *image,
}
// Ignore nsnull cairo surfaces! See bug 666312.
if (!res.mSurface->CairoSurface()) {
if (!res.mSurface->CairoSurface() || res.mSurface->CairoStatus()) {
return NS_OK;
}