Changeset 88523 in webkit


Ignore:
Timestamp:
Jun 9, 2011 11:16:18 PM (13 years ago)
Author:
koz@chromium.org
Message:

2011-06-09 James Kozianski <koz@chromium.org>

Unreviewed, rolling out r88466.
http://trac.webkit.org/changeset/88466
https://bugs.webkit.org/show_bug.cgi?id=60059

Broke PPAPITest.URLLoader test on the chromium bots

  • WebKit.gyp:
  • WebKit.gypi:
  • src/AssociatedURLLoader.cpp: (WebKit::AssociatedURLLoader::ClientAdapter::clearClient): (WebKit::AssociatedURLLoader::ClientAdapter::ClientAdapter): (WebKit::AssociatedURLLoader::ClientAdapter::didFinishLoading): (WebKit::AssociatedURLLoader::ClientAdapter::didFail): (WebKit::AssociatedURLLoader::loadAsynchronously):
  • tests/AssociatedURLLoaderTest.cpp: Removed.
Location:
trunk/Source/WebKit/chromium
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r88507 r88523  
     12011-06-09  James Kozianski  <koz@chromium.org>
     2
     3        Unreviewed, rolling out r88466.
     4        http://trac.webkit.org/changeset/88466
     5        https://bugs.webkit.org/show_bug.cgi?id=60059
     6
     7        Broke PPAPITest.URLLoader test on the chromium bots
     8
     9        * WebKit.gyp:
     10        * WebKit.gypi:
     11        * src/AssociatedURLLoader.cpp:
     12        (WebKit::AssociatedURLLoader::ClientAdapter::clearClient):
     13        (WebKit::AssociatedURLLoader::ClientAdapter::ClientAdapter):
     14        (WebKit::AssociatedURLLoader::ClientAdapter::didFinishLoading):
     15        (WebKit::AssociatedURLLoader::ClientAdapter::didFail):
     16        (WebKit::AssociatedURLLoader::loadAsynchronously):
     17        * tests/AssociatedURLLoaderTest.cpp: Removed.
     18
    1192011-06-09  James Robinson  <jamesr@chromium.org>
    220
  • trunk/Source/WebKit/chromium/WebKit.gyp

    r88466 r88523  
    645645                                # These tests depend on webkit_support and
    646646                                # functions defined only in !WEBKIT_IMPLEMENTATION.
    647                                 'tests/AssociatedURLLoaderTest.cpp',
    648647                                'tests/WebFrameTest.cpp',
    649648                                'tests/WebPageNewSerializerTest.cpp',
  • trunk/Source/WebKit/chromium/WebKit.gypi

    r88466 r88523  
    5454        'webkit_unittest_files': [
    5555            'tests/ArenaTestHelpers.h',
    56             'tests/AssociatedURLLoaderTest.cpp',
    5756            'tests/InnerGestureRecognizerTest.cpp',
    5857            'tests/CCThreadTaskTest.cpp',
  • trunk/Source/WebKit/chromium/src/AssociatedURLLoader.cpp

    r88466 r88523  
    3535#include "DocumentThreadableLoaderClient.h"
    3636#include "SubresourceLoader.h"
    37 #include "Timer.h"
    3837#include "WebApplicationCacheHost.h"
    3938#include "WebDataSource.h"
     
    5655// It forwards its ThreadableLoaderClient notifications to a WebURLLoaderClient.
    5756class AssociatedURLLoader::ClientAdapter : public DocumentThreadableLoaderClient {
    58     WTF_MAKE_NONCOPYABLE(ClientAdapter);
    5957public:
    6058    static PassOwnPtr<ClientAdapter> create(AssociatedURLLoader*, WebURLLoaderClient*, bool /*downloadToFile*/);
     
    7169    virtual bool isDocumentThreadableLoaderClient() { return true; }
    7270
    73     // Enables forwarding of error notifications to the WebURLLoaderClient. These must be
    74     // deferred until after the call to AssociatedURLLoader::loadAsynchronously() completes.
    75     void enableErrorNotifications();
    76 
    77     // Stops loading and releases the DocumentThreadableLoader as early as possible.
    78     void clearClient() { m_client = 0; }
     71    // This method stops loading and releases the DocumentThreadableLoader as early as possible.
     72    void clearClient() { m_client = 0; }
    7973
    8074private:
    8175    ClientAdapter(AssociatedURLLoader*, WebURLLoaderClient*, bool /*downloadToFile*/);
    8276
    83     void notifyError(Timer<ClientAdapter>*);
    84 
    8577    AssociatedURLLoader* m_loader;
    8678    WebURLLoaderClient* m_client;
    87     WebURLError m_error;
    88 
    89     Timer<ClientAdapter> m_errorTimer;
    9079    unsigned long m_downloadLength;
    9180    bool m_downloadToFile;
    92     bool m_enableErrorNotifications;
    93     bool m_didFail;
    9481};
    9582
     
    10289    : m_loader(loader)
    10390    , m_client(client)
    104     , m_errorTimer(this, &ClientAdapter::notifyError)
    10591    , m_downloadLength(0)
    10692    , m_downloadToFile(downloadToFile)
    107     , m_enableErrorNotifications(false)
    108     , m_didFail(false)
    10993{
    11094    ASSERT(m_loader);
     
    161145        int downloadLength = m_downloadLength <= INT_MAX ? m_downloadLength : INT_MAX;
    162146        m_client->didDownloadData(m_loader, downloadLength);
    163         // While the client could have canceled, continue, since the load finished.
     147        // While the client could have cancelled, continue, since the load finished.
    164148    }
    165149
     
    172156        return;
    173157
    174     m_didFail = true;
    175     m_error = WebURLError(error);
    176     if (m_enableErrorNotifications)
    177         notifyError(&m_errorTimer);
    178 }
    179 
    180 void AssociatedURLLoader::ClientAdapter::enableErrorNotifications()
    181 {
    182     m_enableErrorNotifications = true;
    183     // If an error has already been received, start a timer to report it to the client
    184     // after AssociatedURLLoader::loadAsynchronously has returned to the caller.
    185     if (m_didFail)
    186         m_errorTimer.startOneShot(0);
    187 }
    188 
    189 void AssociatedURLLoader::ClientAdapter::notifyError(Timer<ClientAdapter>* timer)
    190 {
    191     ASSERT_UNUSED(timer, timer == &m_errorTimer);
    192 
    193     m_client->didFail(m_loader, m_error);
     158    WebURLError webError(error);
     159    m_client->didFail(m_loader, webError);
    194160}
    195161
     
    250216    Document* webcoreDocument = m_frameImpl->frame()->document();
    251217    m_clientAdapter = ClientAdapter::create(this, m_client, request.downloadToFile());
     218
    252219    m_loader = DocumentThreadableLoader::create(webcoreDocument, m_clientAdapter.get(), webcoreRequest, options);
    253     m_clientAdapter->enableErrorNotifications();
    254220}
    255221
Note: See TracChangeset for help on using the changeset viewer.