From 088b64c968fefa304ff5773c68fe50ec36e8a2ac Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Mon, 18 Jul 2016 18:31:56 -0700 Subject: [PATCH] Bug 1136416 - Hack to pass the context-lost test for now. - r=ethlin MozReview-Commit-ID: 2sue4UcB1Y4 --- dom/canvas/WebGLExtensionVertexArray.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/dom/canvas/WebGLExtensionVertexArray.cpp b/dom/canvas/WebGLExtensionVertexArray.cpp index 86da6945a6f1..1dfa99d84fc6 100644 --- a/dom/canvas/WebGLExtensionVertexArray.cpp +++ b/dom/canvas/WebGLExtensionVertexArray.cpp @@ -25,11 +25,8 @@ WebGLExtensionVertexArray::~WebGLExtensionVertexArray() already_AddRefed WebGLExtensionVertexArray::CreateVertexArrayOES() { - if (mIsLost) { - mContext->ErrorInvalidOperation("%s: Extension is lost.", - "createVertexArrayOES"); + if (mIsLost) return nullptr; - } return mContext->CreateVertexArray(); } @@ -37,11 +34,8 @@ WebGLExtensionVertexArray::CreateVertexArrayOES() void WebGLExtensionVertexArray::DeleteVertexArrayOES(WebGLVertexArray* array) { - if (mIsLost) { - mContext->ErrorInvalidOperation("%s: Extension is lost.", - "deleteVertexArrayOES"); + if (mIsLost) return; - } mContext->DeleteVertexArray(array); } @@ -49,11 +43,8 @@ WebGLExtensionVertexArray::DeleteVertexArrayOES(WebGLVertexArray* array) bool WebGLExtensionVertexArray::IsVertexArrayOES(WebGLVertexArray* array) { - if (mIsLost) { - mContext->ErrorInvalidOperation("%s: Extension is lost.", - "isVertexArrayOES"); + if (mIsLost) return false; - } return mContext->IsVertexArray(array); } @@ -61,11 +52,8 @@ WebGLExtensionVertexArray::IsVertexArrayOES(WebGLVertexArray* array) void WebGLExtensionVertexArray::BindVertexArrayOES(WebGLVertexArray* array) { - if (mIsLost) { - mContext->ErrorInvalidOperation("%s: Extension is lost.", - "bindVertexArrayOES"); + if (mIsLost) return; - } mContext->BindVertexArray(array); }