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

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

Issue 1491123002: Speculative fix for null m_documentLoader in restoreScrollPositionAndViewState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comment Created 5 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index d0c6f2176eeb22d6831d589ca52935a4299cf71f..06ef809c66abecc81a797923acca2df8b2518ec5 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1118,8 +1118,14 @@ FrameLoadType FrameLoader::loadType() const
void FrameLoader::restoreScrollPositionAndViewState()
{
FrameView* view = m_frame->view();
- if (!m_frame->page() || !view || !view->layoutViewportScrollableArea() || !m_currentItem || !m_stateMachine.committedFirstRealDocumentLoad())
+ if (!m_frame->page()
+ || !view
+ || !view->layoutViewportScrollableArea()
+ || !m_currentItem
+ || !m_stateMachine.committedFirstRealDocumentLoad()
+ || !documentLoader()) {
return;
+ }
if (!needsHistoryItemRestore(m_loadType))
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698