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

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

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/DocumentLifecycle.h ('k') | Source/core/dom/Element.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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 DocumentLifecycle::DocumentLifecycle() 64 DocumentLifecycle::DocumentLifecycle()
65 : m_state(Uninitialized) 65 : m_state(Uninitialized)
66 , m_detachCount(0) 66 , m_detachCount(0)
67 { 67 {
68 } 68 }
69 69
70 DocumentLifecycle::~DocumentLifecycle() 70 DocumentLifecycle::~DocumentLifecycle()
71 { 71 {
72 } 72 }
73 73
74 #if !ASSERT_DISABLED 74 #if ASSERT_ENABLED
75 75
76 bool DocumentLifecycle::canAdvanceTo(State state) const 76 bool DocumentLifecycle::canAdvanceTo(State state) const
77 { 77 {
78 if (state > m_state) 78 if (state > m_state)
79 return true; 79 return true;
80 if (m_state == Disposed) { 80 if (m_state == Disposed) {
81 // FIXME: We can dispose a document multiple times. This seems wrong. 81 // FIXME: We can dispose a document multiple times. This seems wrong.
82 // See https://code.google.com/p/chromium/issues/detail?id=301668. 82 // See https://code.google.com/p/chromium/issues/detail?id=301668.
83 return state == Disposed; 83 return state == Disposed;
84 } 84 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 void DocumentLifecycle::ensureStateAtMost(State state) 158 void DocumentLifecycle::ensureStateAtMost(State state)
159 { 159 {
160 ASSERT(state == VisualUpdatePending || state == StyleClean || state == Layou tClean); 160 ASSERT(state == VisualUpdatePending || state == StyleClean || state == Layou tClean);
161 if (m_state <= state) 161 if (m_state <= state)
162 return; 162 return;
163 ASSERT(canRewindTo(state)); 163 ASSERT(canRewindTo(state));
164 m_state = state; 164 m_state = state;
165 } 165 }
166 166
167 } 167 }
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentLifecycle.h ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698