Chromium Code Reviews

Unified Diff: Source/core/loader/FrameLoader.cpp

Issue 145493005: Keep frames to navigate alive in HistoryController::goToEntry() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: improved as suggested in review Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 06bbce3a01c3016cfc61bb863ccc570c8d8bead5..2cde1869d12bc3b8c92a490f385571c82e80708f 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -1407,9 +1407,6 @@ void FrameLoader::loadHistoryItem(HistoryItem* item, HistoryLoadType historyLoad
{
m_provisionalItem = item;
if (historyLoadType == HistorySameDocumentLoad) {
- // loadInSameDocument() might (indirectly) dispatch events, which could lead to the frame being
- // detached, so protect it.
- RefPtr<Frame> protect(m_frame);
loadInSameDocument(item->url(), item->stateObject(), DoNotUpdateBackForwardList, NotClientRedirect);
restoreScrollPositionAndViewState(ForcedRestoreForSameDocumentHistoryNavigation);
return;

Powered by Google App Engine