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

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

Issue 1298643003: Fixes crash when swapping frames (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 402242e0aadd008832a7cd86795df725fb65176c..69af303ca74863ce1a52fb74673bd27fda52a282 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -482,7 +482,7 @@ void FrameLoader::finishedParsing()
m_progressTracker->finishedParsing();
if (client())
- client()->dispatchDidFinishDocumentLoad(m_documentLoader->isCommittedButEmpty());
+ client()->dispatchDidFinishDocumentLoad(m_documentLoader ? m_documentLoader->isCommittedButEmpty() : true);
checkCompleted();
@@ -1255,7 +1255,7 @@ void FrameLoader::processFragment(const KURL& url, LoadStartType loadStartType)
// If scroll position is restored from history fragment then we should not override it unless
// this is a same document reload.
bool shouldScrollToFragment = (loadStartType == NavigationWithinSameDocument && !isBackForwardLoadType(m_loadType))
- || !documentLoader()->initialScrollState().didRestoreFromHistory;
+ || (documentLoader() && !documentLoader()->initialScrollState().didRestoreFromHistory);
Nate Chapin 2015/08/17 19:20:35 Is this part actually necessary? I would have thou
sky 2015/08/17 20:32:36 My first fix was line 485. That fix got me here. S
view->processUrlFragment(url, shouldScrollToFragment ?
FrameView::UrlFragmentScroll : FrameView::UrlFragmentDontScroll);
« 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