Index: Source/web/tests/WebViewTest.cpp |
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp |
index 7155176da6993583757fdf640cd6a9d55d692474..2fc38570ce3e9aaf461da08dca4bdf7f907cbbe9 100644 |
--- a/Source/web/tests/WebViewTest.cpp |
+++ b/Source/web/tests/WebViewTest.cpp |
@@ -891,11 +891,11 @@ TEST_F(WebViewTest, BackForwardRestoreScroll) |
// Emulate a user scroll |
webViewImpl->setMainFrameScrollOffset(WebPoint(0, 900)); |
LocalFrame* mainFrameLocal = toLocalFrame(webViewImpl->page()->mainFrame()); |
- RefPtr<HistoryItem> item1 = mainFrameLocal->loader().currentItem(); |
+ RefPtrWillBePersistent<HistoryItem> item1 = mainFrameLocal->loader().currentItem(); |
// Click an anchor |
mainFrameLocal->loader().load(FrameLoadRequest(mainFrameLocal->document(), ResourceRequest(mainFrameLocal->document()->completeURL("#a")))); |
- RefPtr<HistoryItem> item2 = mainFrameLocal->loader().currentItem(); |
+ RefPtrWillBePersistent<HistoryItem> item2 = mainFrameLocal->loader().currentItem(); |
// Go back, then forward, then back again. |
mainFrameLocal->loader().loadHistoryItem(item1.get(), FrameLoadTypeBackForward, HistorySameDocumentLoad); |
@@ -904,7 +904,7 @@ TEST_F(WebViewTest, BackForwardRestoreScroll) |
// Click a different anchor |
mainFrameLocal->loader().load(FrameLoadRequest(mainFrameLocal->document(), ResourceRequest(mainFrameLocal->document()->completeURL("#b")))); |
- RefPtr<HistoryItem> item3 = mainFrameLocal->loader().currentItem(); |
+ RefPtrWillBePersistent<HistoryItem> item3 = mainFrameLocal->loader().currentItem(); |
// Go back, then forward. The scroll position should be properly set on the forward navigation. |
mainFrameLocal->loader().loadHistoryItem(item1.get(), FrameLoadTypeBackForward, HistorySameDocumentLoad); |