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

Unified Diff: Source/web/tests/WebViewTest.cpp

Issue 639023004: Oilpan: move HistoryItem to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | public/web/WebHistoryItem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | public/web/WebHistoryItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698