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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h

Issue 2751483005: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/html/parser/ (Closed)
Patch Set: rebase Created 3 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/core/html/parser/HTMLConstructionSite.h
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h
index 504887e63d786fee906b10839e7e1980141f5e0a..8920ea03d53b4cca5bc547e5bbd6b77fc995605e 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h
@@ -133,7 +133,7 @@ class HTMLConstructionSite final {
flushPendingText(mode);
// NOTE: Possible reentrancy via JavaScript execution.
executeQueuedTasks();
- ASSERT(mode == FlushIfAtTextLimit || !hasPendingTasks());
+ DCHECK(mode == FlushIfAtTextLimit || !hasPendingTasks());
}
bool hasPendingTasks() {
@@ -291,9 +291,9 @@ class HTMLConstructionSite final {
Node* newNextChild,
const StringView& newString,
WhitespaceMode newWhitespaceMode) {
- ASSERT(!parent || parent == newParent);
+ DCHECK(!parent || parent == newParent);
parent = newParent;
- ASSERT(!nextChild || nextChild == newNextChild);
+ DCHECK(!nextChild || nextChild == newNextChild);
nextChild = newNextChild;
stringBuilder.append(newString);
whitespaceMode = std::min(whitespaceMode, newWhitespaceMode);
@@ -314,9 +314,9 @@ class HTMLConstructionSite final {
bool isEmpty() {
// When the stringbuilder is empty, the parent and whitespace should also
// be "empty".
- ASSERT(stringBuilder.isEmpty() == !parent);
- ASSERT(!stringBuilder.isEmpty() || !nextChild);
- ASSERT(!stringBuilder.isEmpty() || (whitespaceMode == WhitespaceUnknown));
+ DCHECK_EQ(stringBuilder.isEmpty(), !parent);
+ DCHECK(!stringBuilder.isEmpty() || !nextChild);
+ DCHECK(!stringBuilder.isEmpty() || (whitespaceMode == WhitespaceUnknown));
return stringBuilder.isEmpty();
}

Powered by Google App Engine
This is Rietveld 408576698