From 3f9e299b6ee9ec68eb41694703b939dab35e43a3 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 19 Jul 2019 19:08:25 +0200 Subject: Truncate Buffer/Texture on GL_OOM. --- dom/canvas/WebGLBuffer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'dom/canvas/WebGLBuffer.cpp') diff --git a/dom/canvas/WebGLBuffer.cpp b/dom/canvas/WebGLBuffer.cpp index 1eaf37ac4..02a8f649f 100644 --- a/dom/canvas/WebGLBuffer.cpp +++ b/dom/canvas/WebGLBuffer.cpp @@ -134,6 +134,7 @@ WebGLBuffer::BufferData(GLenum target, size_t size, const void* data, GLenum usa if (error) { MOZ_ASSERT(error == LOCAL_GL_OUT_OF_MEMORY); mContext->ErrorOutOfMemory("%s: Error from driver: 0x%04x", funcName, error); + mByteLength = 0; return; } } else { -- cgit v1.2.3