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

Unified Diff: Source/core/editing/VisibleSelection.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/VisibleSelection.cpp
diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp
index c08edf438e0bcdd0e5a2cfd9b3472cb7124e80d2..6a79d0460bdb1014b6a2de6b0ee85b7dc1819002 100644
--- a/Source/core/editing/VisibleSelection.cpp
+++ b/Source/core/editing/VisibleSelection.cpp
@@ -181,7 +181,7 @@ void VisibleSelection::setExtent(const VisiblePosition& visiblePosition)
didChange();
}
-PassRefPtr<Range> VisibleSelection::firstRange() const
+PassRefPtrWillBeRawPtr<Range> VisibleSelection::firstRange() const
{
if (isNone())
return nullptr;
@@ -190,7 +190,7 @@ PassRefPtr<Range> VisibleSelection::firstRange() const
return Range::create(*start.document(), start, end);
}
-PassRefPtr<Range> VisibleSelection::toNormalizedRange() const
+PassRefPtrWillBeRawPtr<Range> VisibleSelection::toNormalizedRange() const
{
if (isNone())
return nullptr;
@@ -262,7 +262,7 @@ bool VisibleSelection::expandUsingGranularity(TextGranularity granularity)
return true;
}
-static PassRefPtr<Range> makeSearchRange(const Position& pos)
+static PassRefPtrWillBeRawPtr<Range> makeSearchRange(const Position& pos)
{
Node* n = pos.deprecatedNode();
if (!n)
@@ -275,7 +275,7 @@ static PassRefPtr<Range> makeSearchRange(const Position& pos)
if (!boundary)
return nullptr;
- RefPtr<Range> searchRange(Range::create(d));
+ RefPtrWillBeRawPtr<Range> searchRange(Range::create(d));
TrackExceptionState exceptionState;
Position start(pos.parentAnchoredEquivalent());
@@ -291,7 +291,7 @@ static PassRefPtr<Range> makeSearchRange(const Position& pos)
void VisibleSelection::appendTrailingWhitespace()
{
- RefPtr<Range> searchRange = makeSearchRange(m_end);
+ RefPtrWillBeRawPtr<Range> searchRange = makeSearchRange(m_end);
if (!searchRange)
return;

Powered by Google App Engine
This is Rietveld 408576698