Clarify what we're testing. r?jrmuizel draft
authorJeff Gilbert <jdashg@gmail.com>
Thu, 07 Apr 2016 14:36:30 -0700
changeset 348700 a91451c16781d04fa08aa4871c967cef22e08ed6
parent 348699 9a4573d10df9dbddfa7732f7972f3a5ab427a880
child 517908 03a3b0eab365327458961da32790f02ce5fdcda5
push id14890
push userjgilbert@mozilla.com
push dateThu, 07 Apr 2016 22:36:48 +0000
reviewersjrmuizel
milestone48.0a1
Clarify what we're testing. r?jrmuizel From a2553704a36aee463e33df74c0b023ec4cf86ba8 Mon Sep 17 00:00:00 2001 --- dom/canvas/WebGLContextDraw.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) MozReview-Commit-ID: BYiQRuQfIq9
dom/canvas/WebGLContextDraw.cpp
--- a/dom/canvas/WebGLContextDraw.cpp
+++ b/dom/canvas/WebGLContextDraw.cpp
@@ -355,18 +355,20 @@ WebGLContext::DrawElements_check(GLsizei
     const GLsizei first = byteOffset / bytesPerElem;
     const CheckedUint32 checked_byteCount = bytesPerElem * CheckedUint32(count);
 
     if (!checked_byteCount.isValid()) {
         ErrorInvalidValue("%s: overflow in byteCount", info);
         return false;
     }
 
-    // Any checks below this depend on a program being available.
-    if (!mCurrentProgram) {
+    // Any checks below this depend on mActiveProgramLinkInfo being available.
+    if (!mActiveProgramLinkInfo) {
+        // Technically, this will only be null iff CURRENT_PROGRAM is null.
+        // But it's better to branch on what we actually care about.
         ErrorInvalidOperation("%s: null CURRENT_PROGRAM", info);
         return false;
     }
 
     if (!mBoundVertexArray->mElementArrayBuffer) {
         ErrorInvalidOperation("%s: must have element array buffer binding", info);
         return false;
     }