Commit f8cb000f authored by eric@webkit.org's avatar eric@webkit.org
Browse files

2010-01-06 Eric Seidel <eric@webkit.org>

        No review, rolling out r52855.
        http://trac.webkit.org/changeset/52855
        https://bugs.webkit.org/show_bug.cgi?id=33222

        Caused 6 layout tests to fail on Mac

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
        * loader/MainResourceLoader.cpp:
        (WebCore::MainResourceLoader::continueAfterContentPolicy):
        * loader/ResourceLoader.cpp:
        * loader/ResourceLoader.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8d8f8cd6
2010-01-06 Eric Seidel <eric@webkit.org>
No review, rolling out r52855.
http://trac.webkit.org/changeset/52855
https://bugs.webkit.org/show_bug.cgi?id=33222
Caused 6 layout tests to fail on Mac
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::continueAfterContentPolicy):
* loader/ResourceLoader.cpp:
* loader/ResourceLoader.h:
2010-01-06 Yong Li <yoli@rim.com>
 
Reviewed by Darin Adler.
......@@ -596,8 +596,10 @@ void DocumentLoader::substituteResourceDeliveryTimerFired(Timer<DocumentLoader>*
SubstituteResource* resource = it->second.get();
if (resource) {
SharedBuffer* data = resource->data();
loader->didReceiveResponse(resource->response());
loader->didReceiveData(*resource->data());
loader->didReceiveData(data->data(), data->size(), data->size(), true);
loader->didFinishLoading();
} else {
// A null resource means that we should fail the load.
......
......@@ -260,7 +260,7 @@ void MainResourceLoader::continueAfterContentPolicy(PolicyAction contentPolicy,
if (frameLoader() && !frameLoader()->isStopping()) {
if (m_substituteData.isValid()) {
if (m_substituteData.content()->size())
ResourceLoader::didReceiveData(*m_substituteData.content());
didReceiveData(m_substituteData.content()->data(), m_substituteData.content()->size(), m_substituteData.content()->size(), true);
if (frameLoader() && !frameLoader()->isStopping())
didFinishLoading();
} else if (shouldLoadAsEmptyDocument(url) || frameLoader()->representationExistsForURLScheme(url.protocol()))
......
/*
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
* (C) 2007 Graham Dennis (graham.dennis@gmail.com)
* Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -254,16 +253,6 @@ void ResourceLoader::didReceiveData(const char* data, int length, long long leng
frameLoader()->notifier()->didReceiveData(this, data, length, static_cast<int>(lengthReceived));
}
void ResourceLoader::didReceiveData(const SharedBuffer& data)
{
const char* segment;
unsigned offset = 0;
while (unsigned length = data.getSomeData(segment, offset)) {
offset += length;
didReceiveData(segment, static_cast<int>(length), offset, false);
}
}
void ResourceLoader::willStopBufferingData(const char* data, int length)
{
if (!m_shouldBufferData)
......
......@@ -79,7 +79,6 @@ namespace WebCore {
virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent);
virtual void didReceiveResponse(const ResourceResponse&);
virtual void didReceiveData(const char*, int, long long lengthReceived, bool allAtOnce);
void didReceiveData(const SharedBuffer&);
void willStopBufferingData(const char*, int);
virtual void didFinishLoading();
virtual void didFail(const ResourceError&);
......
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