 Chromium Code Reviews
 Chromium Code Reviews Issue 224113002:
  Oilpan: move Range object to the oilpan heap.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 224113002:
  Oilpan: move Range object to the oilpan heap.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| Index: Source/core/editing/TextCheckingHelper.h | 
| diff --git a/Source/core/editing/TextCheckingHelper.h b/Source/core/editing/TextCheckingHelper.h | 
| index b572d0301e3cd3a917beedaf70b756ef9565d344..8c820c5f8be0a3483522ec69c0813cc52d78f54c 100644 | 
| --- a/Source/core/editing/TextCheckingHelper.h | 
| +++ b/Source/core/editing/TextCheckingHelper.h | 
| @@ -21,6 +21,7 @@ | 
| #ifndef TextCheckingHelper_h | 
| #define TextCheckingHelper_h | 
| +#include "platform/heap/Handle.h" | 
| #include "platform/text/TextChecking.h" | 
| #include "wtf/text/WTFString.h" | 
| @@ -35,13 +36,14 @@ class TextCheckerClient; | 
| struct TextCheckingResult; | 
| class TextCheckingParagraph { | 
| + DISALLOW_ALLOCATION(); | 
| 
tkent
2014/04/04 01:56:56
probably STACK_ALLOCATED() is correct, and trace()
 
sof
2014/04/04 07:33:23
Thanks, that is how its instances are allocated; s
 | 
| public: | 
| - explicit TextCheckingParagraph(PassRefPtr<Range> checkingRange); | 
| - TextCheckingParagraph(PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragraphRange); | 
| + explicit TextCheckingParagraph(PassRefPtrWillBeRawPtr<Range> checkingRange); | 
| + TextCheckingParagraph(PassRefPtrWillBeRawPtr<Range> checkingRange, PassRefPtrWillBeRawPtr<Range> paragraphRange); | 
| ~TextCheckingParagraph(); | 
| int rangeLength() const; | 
| - PassRefPtr<Range> subrange(int characterOffset, int characterCount) const; | 
| + PassRefPtrWillBeRawPtr<Range> subrange(int characterOffset, int characterCount) const; | 
| int offsetTo(const Position&, ExceptionState&) const; | 
| void expandRangeToNextEnd(); | 
| @@ -60,16 +62,18 @@ public: | 
| String checkingSubstring() const { return textSubstring(checkingStart(), checkingLength()); } | 
| bool checkingRangeCovers(int location, int length) const { return location < checkingEnd() && location + length > checkingStart(); } | 
| - PassRefPtr<Range> paragraphRange() const; | 
| - PassRefPtr<Range> checkingRange() const { return m_checkingRange; } | 
| + PassRefPtrWillBeRawPtr<Range> paragraphRange() const; | 
| + PassRefPtrWillBeRawPtr<Range> checkingRange() const { return m_checkingRange; } | 
| + | 
| + void trace(Visitor*); | 
| private: | 
| void invalidateParagraphRangeValues(); | 
| - PassRefPtr<Range> offsetAsRange() const; | 
| + PassRefPtrWillBeRawPtr<Range> offsetAsRange() const; | 
| - RefPtr<Range> m_checkingRange; | 
| - mutable RefPtr<Range> m_paragraphRange; | 
| - mutable RefPtr<Range> m_offsetAsRange; | 
| + RefPtrWillBeMember<Range> m_checkingRange; | 
| + mutable RefPtrWillBeMember<Range> m_paragraphRange; | 
| + mutable RefPtrWillBeMember<Range> m_offsetAsRange; | 
| mutable String m_text; | 
| mutable int m_checkingStart; | 
| mutable int m_checkingEnd; | 
| @@ -78,19 +82,22 @@ private: | 
| class TextCheckingHelper { | 
| WTF_MAKE_NONCOPYABLE(TextCheckingHelper); | 
| + DISALLOW_ALLOCATION(); | 
| 
tkent
2014/04/04 01:56:56
Ditto.
 | 
| public: | 
| - TextCheckingHelper(SpellCheckerClient&, PassRefPtr<Range>); | 
| + TextCheckingHelper(SpellCheckerClient&, PassRefPtrWillBeRawPtr<Range>); | 
| ~TextCheckingHelper(); | 
| - String findFirstMisspelling(int& firstMisspellingOffset, bool markAll, RefPtr<Range>& firstMisspellingRange); | 
| + String findFirstMisspelling(int& firstMisspellingOffset, bool markAll, RefPtrWillBeRawPtr<Range>& firstMisspellingRange); | 
| String findFirstMisspellingOrBadGrammar(bool checkGrammar, bool& outIsSpelling, int& outFirstFoundOffset, GrammarDetail& outGrammarDetail); | 
| String findFirstBadGrammar(GrammarDetail& outGrammarDetail, int& outGrammarPhraseOffset, bool markAll); | 
| - void markAllMisspellings(RefPtr<Range>& firstMisspellingRange); | 
| + void markAllMisspellings(RefPtrWillBeRawPtr<Range>& firstMisspellingRange); | 
| void markAllBadGrammar(); | 
| + void trace(Visitor*); | 
| + | 
| private: | 
| SpellCheckerClient* m_client; | 
| - RefPtr<Range> m_range; | 
| + RefPtrWillBeMember<Range> m_range; | 
| int findFirstGrammarDetail(const Vector<GrammarDetail>& grammarDetails, int badGrammarPhraseLocation, int startOffset, int endOffset, bool markAll) const; | 
| bool unifiedTextCheckerEnabled() const; |