Skip to content

Commit

Permalink
Merge r186828 - Don't persist history item tree for subframes across …
Browse files Browse the repository at this point in the history
…reloads.

<https://webkit.org/b/146937>
<rdar://problem/19925709>

Reviewed by Brady Eidson.

Throw away the subframe history items when reloading a page. This ensures that we
don't accumulate outdated frame metadata when subframes change name across page loads.
Since the history item tree is encoded in the UA session state and gets serialized to
disk, it's important that we don't let it grow unbounded.

* loader/HistoryController.cpp:
(WebCore::HistoryController::updateForReload):
  • Loading branch information
Andreas Kling authored and carlosgcampos committed Aug 4, 2015
1 parent b5b3d4d commit b739af3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
2015-07-14 Andreas Kling <akling@apple.com>

Don't persist history item tree for subframes across reloads.
<https://webkit.org/b/146937>
<rdar://problem/19925709>

Reviewed by Brady Eidson.

Throw away the subframe history items when reloading a page. This ensures that we
don't accumulate outdated frame metadata when subframes change name across page loads.
Since the history item tree is encoded in the UA session state and gets serialized to
disk, it's important that we don't let it grow unbounded.

* loader/HistoryController.cpp:
(WebCore::HistoryController::updateForReload):

2015-07-10 Brady Eidson <beidson@apple.com>

Crash in HistoryController::updateForCommit dereferencing a null HistoryItem.
Expand Down
3 changes: 3 additions & 0 deletions Source/WebCore/loader/HistoryController.cpp
Expand Up @@ -342,6 +342,9 @@ void HistoryController::updateForReload()

if (m_frame.loader().loadType() == FrameLoadType::Reload || m_frame.loader().loadType() == FrameLoadType::ReloadFromOrigin)
saveScrollPositionAndViewStateToItem(m_currentItem.get());

// Rebuild the history item tree when reloading as trying to re-associate everything is too error-prone.
m_currentItem->clearChildren();
}

// When reloading the page, we may end up redirecting to a different URL
Expand Down

0 comments on commit b739af3

Please sign in to comment.