Commit 48246856 authored by darin@chromium.org's avatar darin@chromium.org

2008-11-04 Darin Fisher <darin@chromium.org>

        Reviewed by Anders Carlsson.

        No need to clobber all ResourceRequest fields in FrameLoader::reload()
        https://bugs.webkit.org/show_bug.cgi?id=21949

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::reload):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ebdfeb60
2008-11-04 Darin Fisher <darin@chromium.org>
Reviewed by Anders Carlsson.
No need to clobber all ResourceRequest fields in FrameLoader::reload()
https://bugs.webkit.org/show_bug.cgi?id=21949
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::reload):
2008-11-04 Darin Adler <darin@apple.com>
Reviewed by Tim Hatcher.
......
......@@ -2437,17 +2437,17 @@ void FrameLoader::reload()
if (!m_documentLoader)
return;
ResourceRequest& initialRequest = m_documentLoader->request();
// If a window is created by javascript, its main frame can have an empty but non-nil URL.
// Reloading in this case will lose the current contents (see 4151001).
if (initialRequest.url().isEmpty())
if (m_documentLoader->request().url().isEmpty())
return;
ResourceRequest initialRequest = m_documentLoader->request();
// Replace error-page URL with the URL we were trying to reach.
KURL unreachableURL = m_documentLoader->unreachableURL();
if (!unreachableURL.isEmpty())
initialRequest = ResourceRequest(unreachableURL);
initialRequest.setURL(unreachableURL);
// Create a new document loader for the reload, this will become m_documentLoader eventually,
// but first it has to be the "policy" document loader, and then the "provisional" document loader.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment