Bug 1447076. Don't accept blob images that don't have any area. r=kats
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Mon, 26 Mar 2018 15:23:20 -0400
changeset 410738 829f884d8d4e1b283c8187c5789ec789516fdd46
parent 410737 b4278b2f0801917efce3826515817a7e1251b4ce
child 410739 2d22f513669f372690e695d172fe4b1d89892cb8
push id33736
push usershindli@mozilla.com
push dateFri, 30 Mar 2018 09:56:41 +0000
treeherdermozilla-central@b7fa9d95150e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1447076
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1447076. Don't accept blob images that don't have any area. r=kats MozReview-Commit-ID: AZHOPQF3hmm
gfx/layers/wr/IpcResourceUpdateQueue.cpp
--- a/gfx/layers/wr/IpcResourceUpdateQueue.cpp
+++ b/gfx/layers/wr/IpcResourceUpdateQueue.cpp
@@ -259,16 +259,17 @@ IpcResourceUpdateQueue::AddImage(ImageKe
   mUpdates.AppendElement(layers::OpAddImage(aDescriptor, bytes, 0, key));
   return true;
 }
 
 bool
 IpcResourceUpdateQueue::AddBlobImage(ImageKey key, const ImageDescriptor& aDescriptor,
                                      Range<uint8_t> aBytes)
 {
+  MOZ_RELEASE_ASSERT(aDescriptor.width > 0 && aDescriptor.height > 0);
   auto bytes = mWriter.Write(aBytes);
   if (!bytes.length()) {
     return false;
   }
   mUpdates.AppendElement(layers::OpAddBlobImage(aDescriptor, bytes, 0, key));
   return true;
 }