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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/UndoStack.cpp

Issue 1878473002: ASSERT -> DCHECK in core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Output info for some DCHECKs, add TODOs. 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved.
3 * Copyright (C) 2012 Google, Inc. All rights reserved. 3 * Copyright (C) 2012 Google, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 } 104 }
105 105
106 void UndoStack::redo() 106 void UndoStack::redo()
107 { 107 {
108 if (canRedo()) { 108 if (canRedo()) {
109 UndoStepStack::iterator back = --m_redoStack.end(); 109 UndoStepStack::iterator back = --m_redoStack.end();
110 UndoStep* step(back->get()); 110 UndoStep* step(back->get());
111 m_redoStack.remove(back); 111 m_redoStack.remove(back);
112 112
113 ASSERT(!m_inRedo); 113 DCHECK(!m_inRedo);
114 TemporaryChange<bool> redoScope(m_inRedo, true); 114 TemporaryChange<bool> redoScope(m_inRedo, true);
115 step->reapply(); 115 step->reapply();
116 // reapply will call us back to push this command onto the undo stack. 116 // reapply will call us back to push this command onto the undo stack.
117 } 117 }
118 } 118 }
119 119
120 DEFINE_TRACE(UndoStack) 120 DEFINE_TRACE(UndoStack)
121 { 121 {
122 visitor->trace(m_undoStack); 122 visitor->trace(m_undoStack);
123 visitor->trace(m_redoStack); 123 visitor->trace(m_redoStack);
124 } 124 }
125 125
126 } // namespace blink 126 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698