Bug 1188010 - Aurora patch. Use MOZ_RELEASE_ASSERT when failure means overflows. r=dglastonbury, a=al
authorMilan Sreckovic <milan@mozilla.com>
Tue, 06 Oct 2015 10:39:30 +0200
changeset 297962 29676f10e50295dd3b706ed782673fd4c5a66077
parent 297961 587400bad501daf5531e25bfb52496430c1e713d
child 297963 719d1e17617147517985be6fed77446b9df1af70
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdglastonbury, al
bugs1188010
milestone43.0a2
Bug 1188010 - Aurora patch. Use MOZ_RELEASE_ASSERT when failure means overflows. r=dglastonbury, a=al
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 "