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

Unified Diff: third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 years, 8 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/dom/ChildFrameDisconnector.cpp
diff --git a/third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp b/third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp
index 9a7ec21970a50f39843ab243eb1a98f5757b2686..5f6c923798d5838525982b9c5b16f15354185a01 100644
--- a/third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp
+++ b/third_party/WebKit/Source/core/dom/ChildFrameDisconnector.cpp
@@ -11,13 +11,13 @@
namespace blink {
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
static unsigned checkConnectedSubframeCountIsConsistent(Node&);
#endif
void ChildFrameDisconnector::disconnect(DisconnectPolicy policy)
{
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
checkConnectedSubframeCountIsConsistent(root());
#endif
@@ -71,7 +71,7 @@ void ChildFrameDisconnector::collectFrameOwners(ElementShadow& shadow)
collectFrameOwners(*root);
}
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
static unsigned checkConnectedSubframeCountIsConsistent(Node& node)
{
unsigned count = 0;
@@ -91,12 +91,12 @@ static unsigned checkConnectedSubframeCountIsConsistent(Node& node)
// If we undercount there's possibly a security bug since we'd leave frames
// in subtrees outside the document.
- ASSERT(node.connectedSubframeCount() >= count);
+ DCHECK_GE(node.connectedSubframeCount(), count);
// If we overcount it's safe, but not optimal because it means we'll traverse
// through the document in ChildFrameDisconnector looking for frames that have
// already been disconnected.
- ASSERT(node.connectedSubframeCount() == count);
+ DCHECK_EQ(node.connectedSubframeCount(), count);
return count;
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/CharacterData.cpp ('k') | third_party/WebKit/Source/core/dom/ChildListMutationScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698