Bug 116928

Summary: Make FrameLoader::reload always use the active document loader
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: aestes, ap, beidson
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Description Ryosuke Niwa 2013-05-29 00:49:52 PDT
We should probably merging https://chromium.googlesource.com/chromium/blink/+/a82e84415acbfc98c19dbbc1a7e144741e593c61

FrameLoader::reload used the m_documentLoader, even if the loader was in the
FrameStateProvisional state.  This means that if the FrameLoader is sent a
reload call while it is loading it's first document, the reload will fail
and instead load "about:blank" since m_documentLoader is empty.  This change
makes reload use the activeDocumentLoader, which means reload works correctly
if the frame is in the FrameStateProvisional state.

This bug exposes itself on Chrome for Android where the browser process can
restore a swapped-out tab, then immediatly call reload on this tab before the
FrameLoader has finished performing the previous load (that was due to the tab
restored from the swapped-out state).