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

Unified Diff: Source/core/editing/UndoStack.cpp

Issue 299353004: Oilpan: move editing objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make test wrapper class finalized Created 6 years, 7 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
« no previous file with comments | « Source/core/editing/UndoStack.h ('k') | Source/core/editing/UndoStep.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/UndoStack.cpp
diff --git a/Source/core/editing/UndoStack.cpp b/Source/core/editing/UndoStack.cpp
index 1ffd4273e98587e652a99fd26b6cc4afcb380c04..3676e0e6885d8dd0ed02187e72edf90cd2c4b87f 100644
--- a/Source/core/editing/UndoStack.cpp
+++ b/Source/core/editing/UndoStack.cpp
@@ -53,7 +53,7 @@ PassOwnPtr<UndoStack> UndoStack::create()
return adoptPtr(new UndoStack());
}
-void UndoStack::registerUndoStep(PassRefPtr<UndoStep> step)
+void UndoStack::registerUndoStep(PassRefPtrWillBeRawPtr<UndoStep> step)
{
if (m_undoStack.size() == maximumUndoStackDepth)
m_undoStack.removeFirst(); // drop oldest item off the far end
@@ -62,7 +62,7 @@ void UndoStack::registerUndoStep(PassRefPtr<UndoStep> step)
m_undoStack.append(step);
}
-void UndoStack::registerRedoStep(PassRefPtr<UndoStep> step)
+void UndoStack::registerRedoStep(PassRefPtrWillBeRawPtr<UndoStep> step)
{
m_redoStack.append(step);
}
@@ -74,7 +74,7 @@ void UndoStack::didUnloadFrame(const LocalFrame& frame)
filterOutUndoSteps(m_redoStack, frame);
}
-void UndoStack::filterOutUndoSteps(UndoStepStack& stack, const LocalFrame& frame)
+void UndoStack::filterOutUndoSteps(WillBePersistentUndoStepStack& stack, const LocalFrame& frame)
{
UndoStepStack newStack;
while (!stack.isEmpty()) {
@@ -100,7 +100,7 @@ void UndoStack::undo()
{
if (canUndo()) {
UndoStepStack::iterator back = --m_undoStack.end();
- RefPtr<UndoStep> step(*back);
+ RefPtrWillBeRawPtr<UndoStep> step(back->get());
m_undoStack.remove(back);
step->unapply();
// unapply will call us back to push this command onto the redo stack.
@@ -111,7 +111,7 @@ void UndoStack::redo()
{
if (canRedo()) {
UndoStepStack::iterator back = --m_redoStack.end();
- RefPtr<UndoStep> step(*back);
+ RefPtrWillBeRawPtr<UndoStep> step(back->get());
m_redoStack.remove(back);
ASSERT(!m_inRedo);
« no previous file with comments | « Source/core/editing/UndoStack.h ('k') | Source/core/editing/UndoStep.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698