Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 1822353002: Revert of wtf/CheckedArithmetic.h delegates to base/numerics/safe_math.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 bf683cfad7d6c9e8bada84a670b31e97d816ecfb..ca5aa844875e91636a01b3f645440ce75788fc16 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -43,7 +43,6 @@
#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"
@@ -871,10 +870,10 @@
width = size().width();
height = size().height();
- CheckedNumeric<int> dataSize = 4;
+ Checked<int, RecordOverflow> dataSize = 4;
dataSize *= width;
dataSize *= height;
- if (!dataSize.IsValid())
+ if (dataSize.hasOverflowed())
return false;
WTF::ArrayBufferContents pixels(width * height, 4, WTF::ArrayBufferContents::NotShared, WTF::ArrayBufferContents::DontInitialize);

Powered by Google App Engine
This is Rietveld 408576698