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

Unified Diff: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp

Issue 2883353002: Replace ASSERT with DCHECK_LE/GE/GT/LT/NE as appropriate (Closed)
Patch Set: DCHECK in BluetoothCharacteristicProperties.cpp Created 3 years, 7 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/core/offscreencanvas/OffscreenCanvas.cpp
diff --git a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
index b59a07a1cf8bfedd48e081a3888baff1b8ca7b0d..7fb5e12ea4affad63190d5f22ef2f8b18ab730eb 100644
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
@@ -200,7 +200,7 @@ OffscreenCanvas::RenderingContextFactories() {
CanvasRenderingContextFactory* OffscreenCanvas::GetRenderingContextFactory(
int type) {
- ASSERT(type < CanvasRenderingContext::kContextTypeCount);
+ DCHECK_LT(type, CanvasRenderingContext::kContextTypeCount);
return RenderingContextFactories()[type].get();
}
@@ -208,7 +208,7 @@ void OffscreenCanvas::RegisterRenderingContextFactory(
std::unique_ptr<CanvasRenderingContextFactory> rendering_context_factory) {
CanvasRenderingContext::ContextType type =
rendering_context_factory->GetContextType();
- ASSERT(type < CanvasRenderingContext::kContextTypeCount);
+ DCHECK_LT(type, CanvasRenderingContext::kContextTypeCount);
DCHECK(!RenderingContextFactories()[type]);
RenderingContextFactories()[type] = std::move(rendering_context_factory);
}

Powered by Google App Engine
This is Rietveld 408576698