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

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

Issue 303133004: Speculative fix for null m_documentLoader deref in FrameLoader::loadInSameDocument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 16fb7acdb782495a4337dab7a859b962196ba1ef..04d15f2f7cee37f4133a7c25a32afc3a775e2b2f 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -1393,6 +1393,12 @@ LocalFrame* FrameLoader::findFrameForNavigation(const AtomicString& name, Docume
void FrameLoader::loadHistoryItem(HistoryItem* item, HistoryLoadType historyLoadType, ResourceRequestCachePolicy cachePolicy)
{
RefPtr<LocalFrame> protect(m_frame);
+ // FIXME: It shouldn't be possible for m_documentLoader to be null without m_frame->page() also being null.
+ // However, it does appear to happen occasionally. This sounds like a side-effect of reentrant frame detach.
+ // See detachClient().
dcheng 2014/05/29 22:43:44 I don't quite understand this comment. Do we check
+ if (!m_documentLoader)
+ return;
+
if (m_frame->page()->defersLoading()) {
m_deferredHistoryLoad = DeferredHistoryLoad(item, historyLoadType, cachePolicy);
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