Changeset 21782 in webkit
- Timestamp:
- May 25, 2007, 3:43:57 PM (18 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r21780 r21782 1 2007-05-25 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Brady. 4 5 <rdar://problem/5209536> 6 http://bugs.webkit.org/show_bug.cgi?id=13757 7 REGRESSION: Leaks seen on buildbot after r21497. 8 9 Fix multipart data loading so it works like Tiger Safari. When one part of a multipart connection has been loaded, 10 move the subresource loader from the subresource loaders set and into a special multipart subresource loader set. This set 11 is not considered when asking a document loader if it's currently loading. 12 13 * loader/DocumentLoader.cpp: 14 (WebCore::DocumentLoader::stopLoading): 15 Always stop the multipart subresource loaders here. 16 17 (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart): 18 New function that moves the loader from m_subresourceLoaders to m_multipartSubresourceLoaders and updates the document loader's state. 19 20 * loader/ProgressTracker.cpp: 21 (WebCore::ProgressTracker::incrementProgress): 22 If a progress item already exists, reuse it. This can happen in some rare circumstances when dealing with multipart data. 23 24 * loader/SubresourceLoader.cpp: 25 (WebCore::SubresourceLoader::didReceiveResponse): 26 Call subresourceLoaderFinishedLoadingOnePart if the response is multipart. 27 1 28 2007-05-25 Patti Hoa <patti@apple.com> 2 29 -
trunk/WebCore/loader/DocumentLoader.cpp
r21760 r21782 264 264 m_frame->loader()->stopLoading(false); 265 265 } 266 266 267 // Always cancel multipart loaders 268 cancelAll(m_multipartSubresourceLoaders); 269 267 270 if (!loading) 268 271 return; … … 699 702 } 700 703 701 } 704 void DocumentLoader::subresourceLoaderFinishedLoadingOnePart(ResourceLoader* loader) 705 { 706 m_multipartSubresourceLoaders.add(loader); 707 m_subresourceLoaders.remove(loader); 708 updateLoading(); 709 if (Frame* frame = m_frame) 710 frame->loader()->checkLoadComplete(); 711 } 712 713 } -
trunk/WebCore/loader/DocumentLoader.h
r21760 r21782 149 149 void removePlugInStreamLoader(ResourceLoader*); 150 150 151 void subresourceLoaderFinishedLoadingOnePart(ResourceLoader*); 152 151 153 private: 152 154 void setupForReplace(); … … 161 163 RefPtr<MainResourceLoader> m_mainResourceLoader; 162 164 ResourceLoaderSet m_subresourceLoaders; 165 ResourceLoaderSet m_multipartSubresourceLoaders; 163 166 ResourceLoaderSet m_plugInStreamLoaders; 164 167 -
trunk/WebCore/loader/ProgressTracker.cpp
r18871 r21782 162 162 m_totalPageAndResourceBytesToLoad += estimatedLength; 163 163 164 m_progressItems.set(identifier, new ProgressItem(estimatedLength)); 164 if (ProgressItem* item = m_progressItems.get(identifier)) { 165 item->bytesReceived = 0; 166 item->estimatedLength = estimatedLength; 167 } else 168 m_progressItems.set(identifier, new ProgressItem(estimatedLength)); 165 169 } 166 170 -
trunk/WebCore/loader/SubresourceLoader.cpp
r21732 r21782 162 162 163 163 // After the first multipart section is complete, signal to delegates that this load is "finished" 164 m_documentLoader->subresourceLoaderFinishedLoadingOnePart(this); 164 165 didFinishLoadingOnePart(); 165 166 }
Note:
See TracChangeset
for help on using the changeset viewer.