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

Side by Side Diff: Source/core/dom/DocumentLifecycle.h

Issue 327323002: Start removing the double-negative !ASSERT_DISABLED (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ActiveDOMObject.cpp ('k') | Source/core/dom/DocumentLifecycle.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void ensureStateAtMost(State); 125 void ensureStateAtMost(State);
126 126
127 void incrementDetachCount() { m_detachCount++; } 127 void incrementDetachCount() { m_detachCount++; }
128 void decrementDetachCount() 128 void decrementDetachCount()
129 { 129 {
130 ASSERT(m_detachCount > 0); 130 ASSERT(m_detachCount > 0);
131 m_detachCount--; 131 m_detachCount--;
132 } 132 }
133 133
134 private: 134 private:
135 #if !ASSERT_DISABLED 135 #if ASSERT_ENABLED
136 bool canAdvanceTo(State) const; 136 bool canAdvanceTo(State) const;
137 bool canRewindTo(State) const; 137 bool canRewindTo(State) const;
138 #endif 138 #endif
139 139
140 State m_state; 140 State m_state;
141 int m_detachCount; 141 int m_detachCount;
142 }; 142 };
143 143
144 inline bool DocumentLifecycle::stateAllowsTreeMutations() const 144 inline bool DocumentLifecycle::stateAllowsTreeMutations() const
145 { 145 {
(...skipping 16 matching lines...) Expand all
162 || m_state == StyleClean 162 || m_state == StyleClean
163 || m_state == InPreLayout 163 || m_state == InPreLayout
164 || m_state == LayoutClean 164 || m_state == LayoutClean
165 || m_state == CompositingClean 165 || m_state == CompositingClean
166 || m_state == Stopping; 166 || m_state == Stopping;
167 } 167 }
168 168
169 } 169 }
170 170
171 #endif 171 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/ActiveDOMObject.cpp ('k') | Source/core/dom/DocumentLifecycle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698