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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: Created 3 years, 11 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/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 1d711cb31da6bb8da232d4b21a31b29fb9ba14e7..33b0908078c8eef512c68d9e8eadec71cd79907c 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -179,17 +179,13 @@ class DraggedNodeImageBuilder {
DraggedNodeImageBuilder(const LocalFrame& localFrame, Node& node)
: m_localFrame(&localFrame),
m_node(&node)
-#if ENABLE(ASSERT)
- ,
- m_domTreeVersion(node.document().domTreeVersion())
-#endif
{
for (Node& descendant : NodeTraversal::inclusiveDescendantsOf(*m_node))
descendant.setDragged(true);
}
~DraggedNodeImageBuilder() {
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
DCHECK_EQ(m_domTreeVersion, m_node->document().domTreeVersion());
#endif
for (Node& descendant : NodeTraversal::inclusiveDescendantsOf(*m_node))
@@ -197,7 +193,7 @@ class DraggedNodeImageBuilder {
}
std::unique_ptr<DragImage> createImage() {
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
DCHECK_EQ(m_domTreeVersion, m_node->document().domTreeVersion());
#endif
// Construct layout object for |m_node| with pseudo class "-webkit-drag"
@@ -236,8 +232,8 @@ class DraggedNodeImageBuilder {
private:
const Member<const LocalFrame> m_localFrame;
const Member<Node> m_node;
-#if ENABLE(ASSERT)
- const uint64_t m_domTreeVersion;
+#if DCHECK_IS_ON()
+ const uint64_t m_domTreeVersion = 0;
Yuta Kitamura 2017/01/19 08:50:02 The original code initializes this to |node.docume
tkent 2017/01/19 10:58:58 It's my fault! Thank you for finding it.
#endif
};
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/frame/SuspendableTimer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698