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

Unified Diff: third_party/WebKit/Source/web/WebAXObject.cpp

Issue 1839643009: RELEASE_ASSERT -> CHECK and ASSERT -> DCHECK in web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return DCHECK_IS_ON checks. 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/web/WebAXObject.cpp
diff --git a/third_party/WebKit/Source/web/WebAXObject.cpp b/third_party/WebKit/Source/web/WebAXObject.cpp
index 4df47cd978ddfc506526aba686a3aaa18bfa71b2..cdc846818b49af859eacaafe8b34a1db91983d41 100644
--- a/third_party/WebKit/Source/web/WebAXObject.cpp
+++ b/third_party/WebKit/Source/web/WebAXObject.cpp
@@ -62,7 +62,7 @@
namespace blink {
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
// It's not safe to call some WebAXObject APIs if a layout is pending.
// Clients should call updateLayoutAndCheckValidity first.
static bool isLayoutClean(Document* document)
@@ -632,7 +632,9 @@ WebRect WebAXObject::boundingBoxRect() const
if (isDetached())
return WebRect();
- ASSERT(isLayoutClean(m_private->getDocument()));
+#if DCHECK_IS_ON()
+ DCHECK(isLayoutClean(m_private->getDocument()));
+#endif
return pixelSnappedIntRect(m_private->elementRect());
}
@@ -1440,7 +1442,7 @@ void WebAXObject::wordBoundaries(WebVector<int>& starts, WebVector<int>& ends) c
WebVector<int> wordStartOffsets(wordBoundaries.size());
WebVector<int> wordEndOffsets(wordBoundaries.size());
for (size_t i = 0; i < wordBoundaries.size(); ++i) {
- ASSERT(wordBoundaries[i].isSimple());
+ DCHECK(wordBoundaries[i].isSimple());
wordStartOffsets[i] = wordBoundaries[i].anchorOffset;
wordEndOffsets[i] = wordBoundaries[i].focusOffset;
}

Powered by Google App Engine
This is Rietveld 408576698