| Index: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| index ca5aa844875e91636a01b3f645440ce75788fc16..bf683cfad7d6c9e8bada84a670b31e97d816ecfb 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| @@ -43,6 +43,7 @@
|
| #include "public/platform/WebGraphicsContext3D.h"
|
| #include "public/platform/WebGraphicsContext3DProvider.h"
|
| #include "wtf/ArrayBufferContents.h"
|
| +#include "wtf/CheckedNumeric.h"
|
| #include <algorithm>
|
| #ifndef NDEBUG
|
| #include "wtf/RefCountedLeakCounter.h"
|
| @@ -870,10 +871,10 @@ bool DrawingBuffer::paintRenderingResultsToImageData(int& width, int& height, So
|
| width = size().width();
|
| height = size().height();
|
|
|
| - Checked<int, RecordOverflow> dataSize = 4;
|
| + CheckedNumeric<int> dataSize = 4;
|
| dataSize *= width;
|
| dataSize *= height;
|
| - if (dataSize.hasOverflowed())
|
| + if (!dataSize.IsValid())
|
| return false;
|
|
|
| WTF::ArrayBufferContents pixels(width * height, 4, WTF::ArrayBufferContents::NotShared, WTF::ArrayBufferContents::DontInitialize);
|
|
|