Changeset 88523 in webkit
- Timestamp:
- Jun 9, 2011 11:16:18 PM (13 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r88507 r88523 1 2011-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 1 19 2011-06-09 James Robinson <jamesr@chromium.org> 2 20 -
trunk/Source/WebKit/chromium/WebKit.gyp
r88466 r88523 645 645 # These tests depend on webkit_support and 646 646 # functions defined only in !WEBKIT_IMPLEMENTATION. 647 'tests/AssociatedURLLoaderTest.cpp',648 647 'tests/WebFrameTest.cpp', 649 648 'tests/WebPageNewSerializerTest.cpp', -
trunk/Source/WebKit/chromium/WebKit.gypi
r88466 r88523 54 54 'webkit_unittest_files': [ 55 55 'tests/ArenaTestHelpers.h', 56 'tests/AssociatedURLLoaderTest.cpp',57 56 'tests/InnerGestureRecognizerTest.cpp', 58 57 'tests/CCThreadTaskTest.cpp', -
trunk/Source/WebKit/chromium/src/AssociatedURLLoader.cpp
r88466 r88523 35 35 #include "DocumentThreadableLoaderClient.h" 36 36 #include "SubresourceLoader.h" 37 #include "Timer.h"38 37 #include "WebApplicationCacheHost.h" 39 38 #include "WebDataSource.h" … … 56 55 // It forwards its ThreadableLoaderClient notifications to a WebURLLoaderClient. 57 56 class AssociatedURLLoader::ClientAdapter : public DocumentThreadableLoaderClient { 58 WTF_MAKE_NONCOPYABLE(ClientAdapter);59 57 public: 60 58 static PassOwnPtr<ClientAdapter> create(AssociatedURLLoader*, WebURLLoaderClient*, bool /*downloadToFile*/); … … 71 69 virtual bool isDocumentThreadableLoaderClient() { return true; } 72 70 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; } 79 73 80 74 private: 81 75 ClientAdapter(AssociatedURLLoader*, WebURLLoaderClient*, bool /*downloadToFile*/); 82 76 83 void notifyError(Timer<ClientAdapter>*);84 85 77 AssociatedURLLoader* m_loader; 86 78 WebURLLoaderClient* m_client; 87 WebURLError m_error;88 89 Timer<ClientAdapter> m_errorTimer;90 79 unsigned long m_downloadLength; 91 80 bool m_downloadToFile; 92 bool m_enableErrorNotifications;93 bool m_didFail;94 81 }; 95 82 … … 102 89 : m_loader(loader) 103 90 , m_client(client) 104 , m_errorTimer(this, &ClientAdapter::notifyError)105 91 , m_downloadLength(0) 106 92 , m_downloadToFile(downloadToFile) 107 , m_enableErrorNotifications(false)108 , m_didFail(false)109 93 { 110 94 ASSERT(m_loader); … … 161 145 int downloadLength = m_downloadLength <= INT_MAX ? m_downloadLength : INT_MAX; 162 146 m_client->didDownloadData(m_loader, downloadLength); 163 // While the client could have cancel ed, continue, since the load finished.147 // While the client could have cancelled, continue, since the load finished. 164 148 } 165 149 … … 172 156 return; 173 157 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); 194 160 } 195 161 … … 250 216 Document* webcoreDocument = m_frameImpl->frame()->document(); 251 217 m_clientAdapter = ClientAdapter::create(this, m_client, request.downloadToFile()); 218 252 219 m_loader = DocumentThreadableLoader::create(webcoreDocument, m_clientAdapter.get(), webcoreRequest, options); 253 m_clientAdapter->enableErrorNotifications();254 220 } 255 221
Note: See TracChangeset
for help on using the changeset viewer.