Index: third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.h |
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.h b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.h |
index 9d89fe31d0864e71987578c32b976664ed21cc3a..48d15960197d1099e7449fd7e9019c226bf81f71 100644 |
--- a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.h |
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.h |
@@ -19,12 +19,12 @@ class TextIteratorTextState; |
// TextIteratorTextNodeHandler extracts plain text from a text node by calling |
// HandleTextNode() function. It should be used only by TextIterator. |
-class TextIteratorTextNodeHandler final { |
- STACK_ALLOCATED(); |
- |
+class TextIteratorTextNodeHandler final |
+ : public GarbageCollectedFinalized<TextIteratorTextNodeHandler> { |
public: |
TextIteratorTextNodeHandler(const TextIteratorBehavior&, |
TextIteratorTextState*); |
+ ~TextIteratorTextNodeHandler() {} |
Text* GetNode() const { return text_node_; } |
@@ -44,6 +44,8 @@ class TextIteratorTextNodeHandler final { |
void HandleTextNodeEndAt(Text*, int end_offset); |
void HandleTextNodeInRange(Text*, int start_offset, int end_offset); |
+ DECLARE_TRACE(); |
+ |
private: |
void HandlePreFormattedTextNode(); |
void HandleTextBox(); |
@@ -97,7 +99,7 @@ class TextIteratorTextNodeHandler final { |
const TextIteratorBehavior behavior_; |
// Contains state of emitted text. |
- TextIteratorTextState& text_state_; |
+ const Member<TextIteratorTextState> text_state_; |
DISALLOW_COPY_AND_ASSIGN(TextIteratorTextNodeHandler); |
}; |