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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.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/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 4a111e61cb7b2e8f66d5ad11de00a65a803ad417..075179a7b6fcecf1b5677f6f914e6bcd3c7c7802 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -83,7 +83,6 @@
#include "modules/webgl/WebGLUniformLocation.h"
#include "modules/webgl/WebGLVertexArrayObject.h"
#include "modules/webgl/WebGLVertexArrayObjectOES.h"
-#include "platform/CheckedInt.h"
#include "platform/CrossThreadFunctional.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/WaitableEvent.h"
@@ -93,6 +92,7 @@
#include "platform/graphics/gpu/AcceleratedImageBufferSurface.h"
#include "public/platform/Platform.h"
#include "public/platform/functional/WebFunction.h"
+#include "wtf/CheckedNumeric.h"
#include "wtf/Functional.h"
#include "wtf/PtrUtil.h"
#include "wtf/text/StringBuilder.h"
@@ -5765,11 +5765,11 @@ bool WebGLRenderingContextBase::validateTexFuncData(const char* functionName, Te
synthesizeGLError(error, functionName, "invalid texture dimensions");
return false;
}
- CheckedInt<uint32_t> total = srcOffset;
+ CheckedNumeric<uint32_t> total = srcOffset;
total *= pixels->typeSize();
total += totalBytesRequired;
total += skipBytes;
- if (!total.isValid() || pixels->byteLength() < total.value()) {
+ if (!total.IsValid() || pixels->byteLength() < total.ValueOrDie()) {
synthesizeGLError(GL_INVALID_OPERATION, functionName, "ArrayBufferView not big enough for request");
return false;
}
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698