Bug 1188010 - Use MOZ_RELEASE_ASSERT when failure means overflow. - r=kamidphish, a=abillings
authorJeff Gilbert <jgilbert@mozilla.com>
Wed, 07 Oct 2015 13:24:39 -0700
changeset 291137 129c9cd4e428d1b113c9ac6703635e19c3506471
parent 291136 4a08db68940e2ca39fccb562bc4482d459cbc6c4
child 291138 e7c32a898f4dd825e236f38bafcc8a446b263cb4
push id934
push userraliiev@mozilla.com
push dateMon, 26 Oct 2015 12:58:05 +0000
treeherdermozilla-release@05704e35c1d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskamidphish, abillings
bugs1188010
milestone42.0
Bug 1188010 - Use MOZ_RELEASE_ASSERT when failure means overflow. - r=kamidphish, a=abillings
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 "