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

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

Issue 224113002: Oilpan: move Range object to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use STACK_ALLOCATED() + incorporate ager's overview of macros in this area. Created 6 years, 9 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/SurroundingText.cpp
diff --git a/Source/core/editing/SurroundingText.cpp b/Source/core/editing/SurroundingText.cpp
index 8bcd90f188398775917470f0dcf4e3de085eb329..cefe4005a39eb0a239b7d95b177dff9a0aeb1182 100644
--- a/Source/core/editing/SurroundingText.cpp
+++ b/Source/core/editing/SurroundingText.cpp
@@ -53,7 +53,7 @@ SurroundingText::SurroundingText(const VisiblePosition& visiblePosition, unsigne
Position position = visiblePosition.deepEquivalent().parentAnchoredEquivalent();
Document* document = position.document();
ASSERT(document);
- RefPtr<Range> forwardRange = forwardIterator.range();
+ RefPtrWillBeRawPtr<Range> forwardRange = forwardIterator.range();
if (!forwardRange || !Range::create(*document, position, forwardRange->startPosition())->text().length()) {
ASSERT(forwardRange);
return;
@@ -63,7 +63,7 @@ SurroundingText::SurroundingText(const VisiblePosition& visiblePosition, unsigne
if (!backwardsIterator.atEnd())
backwardsIterator.advance(halfMaxLength);
- RefPtr<Range> backwardsRange = backwardsIterator.range();
+ RefPtrWillBeRawPtr<Range> backwardsRange = backwardsIterator.range();
if (!backwardsRange) {
ASSERT(backwardsRange);
return;
@@ -74,7 +74,7 @@ SurroundingText::SurroundingText(const VisiblePosition& visiblePosition, unsigne
ASSERT(m_contentRange);
}
-PassRefPtr<Range> SurroundingText::rangeFromContentOffsets(unsigned startOffsetInContent, unsigned endOffsetInContent)
+PassRefPtrWillBeRawPtr<Range> SurroundingText::rangeFromContentOffsets(unsigned startOffsetInContent, unsigned endOffsetInContent)
{
if (startOffsetInContent >= endOffsetInContent || endOffsetInContent > content().length())
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698