Bug 13821850 - Check the status of GLContext::MakeCurrent in CanvasRenderingContext2D. r=Bas

This commit is contained in:
Nicolas Silva 2017-07-24 12:24:21 +02:00
parent 24239ea4f0
commit 13f0f93675

View File

@ -5232,7 +5232,10 @@ CanvasRenderingContext2D::DrawImage(const CanvasImageSource& aImage,
}
{
gl->MakeCurrent();
if (!gl->MakeCurrent()) {
aError.Throw(NS_ERROR_NOT_AVAILABLE);
return;
}
GLuint videoTexture = 0;
gl->fGenTextures(1, &videoTexture);
// skiaGL expect upload on drawing, and uses texture 0 for texturing,