Bug 1294607 - Remove unnecessary EnsureTarget in CanvasRenderingContext2D. r=nical

This commit is contained in:
Ethan Lin 2016-08-11 20:26:00 -04:00
Родитель b90984b4da
Коммит 93ca898ab6
1 изменённых файлов: 0 добавлений и 2 удалений

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

@ -5132,7 +5132,6 @@ 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)) {
@ -5648,7 +5647,6 @@ CanvasRenderingContext2D::PutImageData_explicit(int32_t aX, int32_t aY, uint32_t
srcLine += aW * 4;
}
EnsureTarget();
if (!IsTargetValid()) {
return NS_ERROR_FAILURE;
}