Back out 6493296521fb (bug 1294607) for crashtest crashes in 1246775-1.html

This commit is contained in:
Phil Ringnalda 2016-08-15 20:54:50 -07:00
parent e7ead846af
commit 54ad5f454e

View File

@ -5132,6 +5132,7 @@ CanvasRenderingContext2D::DrawWindow(nsGlobalWindow& aWindow, double aX,
Unused << shell->RenderDocument(r, renderDocFlags, backgroundColor, thebes);
// If this canvas was contained in the drawn window, the pre-transaction callback
// may have returned its DT. If so, we must reacquire it here.
EnsureTarget();
if (drawDT) {
RefPtr<SourceSurface> snapshot = drawDT->Snapshot();
if (NS_WARN_IF(!snapshot)) {
@ -5647,6 +5648,7 @@ CanvasRenderingContext2D::PutImageData_explicit(int32_t aX, int32_t aY, uint32_t
srcLine += aW * 4;
}
EnsureTarget();
if (!IsTargetValid()) {
return NS_ERROR_FAILURE;
}