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

Unified Diff: Source/core/dom/RangeTest.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/dom/RangeTest.cpp
diff --git a/Source/core/dom/RangeTest.cpp b/Source/core/dom/RangeTest.cpp
index a4ac88341c09c166f5d606b93e33f2f465263c25..d724aaa29af2816f7e5d97c7eb4ddcb89fa3e267 100644
--- a/Source/core/dom/RangeTest.cpp
+++ b/Source/core/dom/RangeTest.cpp
@@ -12,6 +12,7 @@
#include "core/html/HTMLDocument.h"
#include "core/html/HTMLElement.h"
#include "core/html/HTMLHtmlElement.h"
+#include "platform/heap/Handle.h"
#include "wtf/Compiler.h"
#include "wtf/RefPtr.h"
#include "wtf/text/AtomicString.h"
@@ -49,10 +50,10 @@ TEST_F(RangeTest, SplitTextNodeRangeWithinText)
document().body()->setInnerHTML("1234", ASSERT_NO_EXCEPTION);
Text* oldText = toText(document().body()->firstChild());
- RefPtr<Range> range04 = Range::create(document(), oldText, 0, oldText, 4);
- RefPtr<Range> range02 = Range::create(document(), oldText, 0, oldText, 2);
- RefPtr<Range> range22 = Range::create(document(), oldText, 2, oldText, 2);
- RefPtr<Range> range24 = Range::create(document(), oldText, 2, oldText, 4);
+ RefPtrWillBeRawPtr<Range> range04 = Range::create(document(), oldText, 0, oldText, 4);
+ RefPtrWillBeRawPtr<Range> range02 = Range::create(document(), oldText, 0, oldText, 2);
+ RefPtrWillBeRawPtr<Range> range22 = Range::create(document(), oldText, 2, oldText, 2);
+ RefPtrWillBeRawPtr<Range> range24 = Range::create(document(), oldText, 2, oldText, 4);
oldText->splitText(2, ASSERT_NO_EXCEPTION);
Text* newText = toText(oldText->nextSibling());
@@ -92,12 +93,12 @@ TEST_F(RangeTest, SplitTextNodeRangeOutsideText)
Element* innerRight = document().getElementById(AtomicString::fromUTF8("inner-right"));
Text* oldText = toText(outer->childNodes()->item(2));
- RefPtr<Range> rangeOuterOutside = Range::create(document(), outer, 0, outer, 5);
- RefPtr<Range> rangeOuterInside = Range::create(document(), outer, 1, outer, 4);
- RefPtr<Range> rangeOuterSurroundingText = Range::create(document(), outer, 2, outer, 3);
- RefPtr<Range> rangeInnerLeft = Range::create(document(), innerLeft, 0, innerLeft, 1);
- RefPtr<Range> rangeInnerRight = Range::create(document(), innerRight, 0, innerRight, 1);
- RefPtr<Range> rangeFromTextToMiddleOfElement = Range::create(document(), oldText, 6, outer, 3);
+ RefPtrWillBeRawPtr<Range> rangeOuterOutside = Range::create(document(), outer, 0, outer, 5);
+ RefPtrWillBeRawPtr<Range> rangeOuterInside = Range::create(document(), outer, 1, outer, 4);
+ RefPtrWillBeRawPtr<Range> rangeOuterSurroundingText = Range::create(document(), outer, 2, outer, 3);
+ RefPtrWillBeRawPtr<Range> rangeInnerLeft = Range::create(document(), innerLeft, 0, innerLeft, 1);
+ RefPtrWillBeRawPtr<Range> rangeInnerRight = Range::create(document(), innerRight, 0, innerRight, 1);
+ RefPtrWillBeRawPtr<Range> rangeFromTextToMiddleOfElement = Range::create(document(), oldText, 6, outer, 3);
oldText->splitText(3, ASSERT_NO_EXCEPTION);
Text* newText = toText(oldText->nextSibling());

Powered by Google App Engine
This is Rietveld 408576698