diff options
Diffstat (limited to 'Source/WebCore/loader/DocumentLoader.cpp')
-rw-r--r-- | Source/WebCore/loader/DocumentLoader.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp index ea69bf52f..5ca9d683d 100644 --- a/Source/WebCore/loader/DocumentLoader.cpp +++ b/Source/WebCore/loader/DocumentLoader.cpp @@ -47,14 +47,14 @@ #include "InspectorInstrumentation.h" #include "Logging.h" #include "MainResourceLoader.h" -#include "MemoryInstrumentation.h" #include "Page.h" -#include "PlatformString.h" #include "Settings.h" #include "SharedBuffer.h" #include "TextResourceDecoder.h" +#include "WebCoreMemoryInstrumentation.h" #include <wtf/Assertions.h> #include <wtf/text/CString.h> +#include <wtf/text/WTFString.h> #include <wtf/unicode/Unicode.h> #if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML) @@ -336,7 +336,9 @@ void DocumentLoader::commitData(const char* bytes, size_t length) m_frame->document()->setBaseURLOverride(m_archive->mainResource()->url()); #endif - if (!frameLoader()->isReplacing()) + // Call receivedFirstData() exactly once per load. We should only reach this point multiple times + // for multipart loads, and isReplacing() will be true after the first time. + if (!m_mainResourceLoader || !m_mainResourceLoader->isLoadingMultipartContent() || !frameLoader()->isReplacing()) frameLoader()->receivedFirstData(); bool userChosen = true; @@ -357,7 +359,7 @@ void DocumentLoader::commitData(const char* bytes, size_t length) void DocumentLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const { - MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Loader); + MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader); info.addInstrumentedMember(m_frame); info.addInstrumentedMember(m_mainResourceLoader); info.addInstrumentedHashSet(m_subresourceLoaders); |