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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Issue 2339323003: Remove platform/CheckedInt.h, we can use wtf/CheckedNumeric.h instead. (Closed)
Patch Set: Created 4 years, 3 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/modules/webgl/WebGL2RenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index ad89f564747c4d18647836e4a2494075ab290dd6..d7baad33761080ec6cfde21b119e18ba02e1bb72 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -24,8 +24,8 @@
#include "modules/webgl/WebGLTransformFeedback.h"
#include "modules/webgl/WebGLUniformLocation.h"
#include "modules/webgl/WebGLVertexArrayObject.h"
-#include "platform/CheckedInt.h"
#include "public/platform/WebGraphicsContext3DProvider.h"
+#include "wtf/CheckedNumeric.h"
#include "wtf/PtrUtil.h"
#include "wtf/text/WTFString.h"
#include <memory>
@@ -58,9 +58,9 @@ bool validateSubSourceAndGetData(DOMArrayBufferView* view, GLuint subOffset, GLu
// type size is at most 8, so no overflow.
byteOffset = subOffset * typeSize;
}
- CheckedInt<long long> total = byteOffset;
+ CheckedNumeric<long long> total = byteOffset;
total += byteLength;
- if (!total.isValid() || total.value() > view->byteLength()) {
+ if (!total.IsValid() || total.ValueOrDie() > view->byteLength()) {
return false;
}
if (!byteLength) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMDataView.cpp ('k') | third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698