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

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

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase past r181245 conflict Created 6 years, 3 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: Source/core/editing/CompositeEditCommand.cpp
diff --git a/Source/core/editing/CompositeEditCommand.cpp b/Source/core/editing/CompositeEditCommand.cpp
index 3a4a13474b25e65afca21ce00bfbcc8f7ac19052..aa07c5ad089afd262e72396e491a02d08bdec6fa 100644
--- a/Source/core/editing/CompositeEditCommand.cpp
+++ b/Source/core/editing/CompositeEditCommand.cpp
@@ -62,6 +62,7 @@
#include "core/editing/htmlediting.h"
#include "core/editing/markup.h"
#include "core/events/ScopedEventQueue.h"
+#include "core/frame/FrameProtector.h"
#include "core/frame/LocalFrame.h"
#include "core/html/HTMLBRElement.h"
#include "core/html/HTMLDivElement.h"
@@ -103,7 +104,8 @@ bool EditCommandComposition::belongsTo(const LocalFrame& frame) const
void EditCommandComposition::unapply()
{
ASSERT(m_document);
- RefPtr<LocalFrame> frame = m_document->frame();
+ LocalFrame* frame = m_document->frame();
+ FrameProtector protect(frame);
ASSERT(frame);
// Changes to the document may have been made since the last editing operation that require a layout, as in <rdar://problem/5658603>.
@@ -123,7 +125,8 @@ void EditCommandComposition::unapply()
void EditCommandComposition::reapply()
{
ASSERT(m_document);
- RefPtr<LocalFrame> frame = m_document->frame();
+ LocalFrame* frame = m_document->frame();
+ FrameProtector protect(frame);
ASSERT(frame);
// Changes to the document may have been made since the last editing operation that require a layout, as in <rdar://problem/5658603>.

Powered by Google App Engine
This is Rietveld 408576698