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

Unified Diff: Source/core/editing/Editor.h

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors 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/Editor.h
diff --git a/Source/core/editing/Editor.h b/Source/core/editing/Editor.h
index 4008c057e7b4c601d9184f38cec3514b46b3333b..06d69104e251b78136ff42a537193f39a5909589 100644
--- a/Source/core/editing/Editor.h
+++ b/Source/core/editing/Editor.h
@@ -71,8 +71,6 @@ public:
EditorClient& client() const;
- LocalFrame& frame() const { return m_frame; }
-
CompositeEditCommand* lastEditCommand() { return m_lastEditCommand.get(); }
void handleKeyboardEvent(KeyboardEvent*);
@@ -130,9 +128,10 @@ public:
bool shouldStyleWithCSS() const { return m_shouldStyleWithCSS; }
class Command {
+ STACK_ALLOCATED();
public:
Command();
- Command(const EditorInternalCommand*, EditorCommandSource, PassRefPtr<LocalFrame>);
+ Command(const EditorInternalCommand*, EditorCommandSource, PassRefPtrWillBeRawPtr<LocalFrame>);
bool execute(const String& parameter = String(), Event* triggeringEvent = 0) const;
bool execute(Event* triggeringEvent) const;
@@ -148,9 +147,11 @@ public:
// Returns 0 if this Command is not supported.
int idForHistogram() const;
private:
+ LocalFrame& frame() const { return *m_frame; }
+
const EditorInternalCommand* m_command;
EditorCommandSource m_source;
- RefPtr<LocalFrame> m_frame;
+ RefPtrWillBeMember<LocalFrame> m_frame;
};
Command command(const String& commandName); // Command source is CommandFromMenuOrKeyBinding.
Command command(const String& commandName, EditorCommandSource);
@@ -238,7 +239,7 @@ public:
void trace(Visitor*);
private:
- LocalFrame& m_frame;
+ RawPtrWillBeMember<LocalFrame> m_frame;
RefPtrWillBeMember<CompositeEditCommand> m_lastEditCommand;
int m_preventRevealSelection;
bool m_shouldStartNewKillRingSequence;
@@ -251,6 +252,8 @@ private:
explicit Editor(LocalFrame&);
+ LocalFrame& frame() const { return *m_frame; }
+
bool canDeleteRange(Range*) const;
UndoStack* undoStack() const;

Powered by Google App Engine
This is Rietveld 408576698