diff --git a/dom/canvas/WebGLTexture.cpp b/dom/canvas/WebGLTexture.cpp
--- a/dom/canvas/WebGLTexture.cpp
+++ b/dom/canvas/WebGLTexture.cpp
@@ -643,18 +643,17 @@ WebGLTexture::EnsureInitializedImageData
     size_t bytespertexel = bitspertexel / 8;
     CheckedUint32 checked_byteLength
         = WebGLContext::GetImageSize(
                         imageInfo.mHeight,
                         imageInfo.mWidth,
                         imageInfo.mDepth,
                         bytespertexel,
                         mContext->mPixelStoreUnpackAlignment);
-    MOZ_ASSERT(checked_byteLength.isValid()); // Should have been checked
-                                              // earlier.
+    MOZ_RELEASE_ASSERT(checked_byteLength.isValid()); // Should have been checked earlier.
 
     size_t byteCount = checked_byteLength.value();
 
     UniquePtr<uint8_t> zeros((uint8_t*)calloc(1, byteCount));
     if (zeros == nullptr) {
         // Failed to allocate memory. Lose the context. Return OOM error.
         mContext->ForceLoseContext(true);
         mContext->ErrorOutOfMemory("EnsureInitializedImageData: Failed to alloc %u "
