Changeset 20206 in webkit
- Timestamp:
- Mar 14, 2007 9:00:06 PM (17 years ago)
- Location:
- trunk/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/ChangeLog
r20201 r20206 1 2007-03-14 Anders Carlsson <acarlsson@apple.com> 2 3 Reviewed by Geoff. 4 5 http://bugs.webkit.org/show_bug.cgi?id=13076 6 REGRESSION: Multiple loading tabs cause assertion in WebDocumentLoaderMac::decreaseLoadCount(unsigned long) 7 8 Store the identifier set in the document loader since identifiers are per-webview and not global. 9 10 * WebView/WebDocumentLoaderMac.h: 11 * WebView/WebDocumentLoaderMac.mm: 12 (WebDocumentLoaderMac::WebDocumentLoaderMac): 13 (WebDocumentLoaderMac::attachToFrame): 14 (WebDocumentLoaderMac::increaseLoadCount): 15 (WebDocumentLoaderMac::decreaseLoadCount): 16 1 17 2007-03-14 David Harrison <harrison@apple.com> 2 18 -
trunk/WebKit/WebView/WebDocumentLoaderMac.h
r20195 r20206 28 28 29 29 #import <WebCore/DocumentLoader.h> 30 #import <wtf/HashSet.h> 30 31 31 32 @class WebDataSource; … … 51 52 WebDataSource *m_dataSource; 52 53 bool m_hasEverBeenDetached; 53 unsigned m_loadCount;54 HashSet<unsigned long> m_loadingResources; 54 55 }; -
trunk/WebKit/WebView/WebDocumentLoaderMac.mm
r20195 r20206 35 35 using namespace WebCore; 36 36 37 static HashSet<unsigned long>& loadingResources()38 {39 static HashSet<unsigned long> resources;40 41 return resources;42 }43 44 37 WebDocumentLoaderMac::WebDocumentLoaderMac(const ResourceRequest& request, const SubstituteData& substituteData) 45 38 : DocumentLoader(request, substituteData) 46 39 , m_dataSource(nil) 47 40 , m_hasEverBeenDetached(false) 48 , m_loadCount(0)49 41 { 50 42 } … … 65 57 { 66 58 DocumentLoader::attachToFrame(); 67 ASSERT(m_load Count == 0);59 ASSERT(m_loadingResources.isEmpty()); 68 60 69 61 if (m_hasEverBeenDetached) … … 83 75 ASSERT(m_dataSource); 84 76 85 if ( loadingResources().contains(identifier))77 if (m_loadingResources.contains(identifier)) 86 78 return; 87 88 loadingResources().add(identifier); 89 90 if (m_loadCount == 0) 79 80 if (m_loadingResources.isEmpty() == 0) 91 81 HardRetain(m_dataSource); 92 93 m_load Count++;82 83 m_loadingResources.add(identifier); 94 84 } 95 85 96 86 void WebDocumentLoaderMac::decreaseLoadCount(unsigned long identifier) 97 87 { 98 ASSERT(m_loadCount > 0); 99 100 loadingResources().remove(identifier); 88 ASSERT(m_loadingResources.contains(identifier)); 101 89 102 m_load Count--;103 104 if (m_load Count == 0)90 m_loadingResources.remove(identifier); 91 92 if (m_loadingResources.isEmpty()) 105 93 HardRelease(m_dataSource); 106 94 }
Note: See TracChangeset
for help on using the changeset viewer.