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

Unified Diff: Source/web/ContextMenuClientImpl.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/web/ContextMenuClientImpl.cpp
diff --git a/Source/web/ContextMenuClientImpl.cpp b/Source/web/ContextMenuClientImpl.cpp
index e15b951f6a5000217ab3c618d581b7c245ebc116..fd1b3219aa96b5ff4e590986859f31634fec8878 100644
--- a/Source/web/ContextMenuClientImpl.cpp
+++ b/Source/web/ContextMenuClientImpl.cpp
@@ -158,14 +158,14 @@ static String selectMisspellingAsync(LocalFrame* selectedFrame, DocumentMarker&
return String();
// Caret and range selections always return valid normalized ranges.
- RefPtr<Range> selectionRange = selection.toNormalizedRange();
+ RefPtrWillBeRawPtr<Range> selectionRange = selection.toNormalizedRange();
Vector<DocumentMarker*> markers = selectedFrame->document()->markers().markersInRange(selectionRange.get(), DocumentMarker::MisspellingMarkers());
if (markers.size() != 1)
return String();
marker = *markers[0];
// Cloning a range fails only for invalid ranges.
- RefPtr<Range> markerRange = selectionRange->cloneRange(ASSERT_NO_EXCEPTION);
+ RefPtrWillBeRawPtr<Range> markerRange = selectionRange->cloneRange(ASSERT_NO_EXCEPTION);
markerRange->setStart(markerRange->startContainer(), marker.startOffset());
markerRange->setEnd(markerRange->endContainer(), marker.endOffset());

Powered by Google App Engine
This is Rietveld 408576698