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

Unified Diff: Source/WebKit/chromium/src/WebFrameImpl.cpp

Issue 7711011: Merge 93296 - Prepare frames for history navigation. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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/WebKit/chromium/ChangeLog ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebFrameImpl.cpp
===================================================================
--- Source/WebKit/chromium/src/WebFrameImpl.cpp (revision 93532)
+++ Source/WebKit/chromium/src/WebFrameImpl.cpp (working copy)
@@ -861,17 +861,8 @@
RefPtr<HistoryItem> historyItem = PassRefPtr<HistoryItem>(item);
ASSERT(historyItem.get());
- // If there is no currentItem, which happens when we are navigating in
- // session history after a crash, we need to manufacture one otherwise WebKit
- // hoarks. This is probably the wrong thing to do, but it seems to work.
+ m_frame->loader()->prepareForHistoryNavigation();
RefPtr<HistoryItem> currentItem = m_frame->loader()->history()->currentItem();
- if (!currentItem) {
- currentItem = HistoryItem::create();
- currentItem->setLastVisitWasFailure(true);
- m_frame->loader()->history()->setCurrentItem(currentItem.get());
- m_frame->page()->backForward()->setCurrentItem(currentItem.get());
- }
-
m_inSameDocumentHistoryLoad = currentItem->shouldDoSameDocumentNavigationTo(historyItem.get());
m_frame->page()->goToItem(historyItem.get(),
FrameLoadTypeIndexedBackForward);
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698