Changeset 173501 in webkit
- Timestamp:
- Sep 10, 2014, 5:47:26 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r173499 r173501 1 2014-09-10 Tim Horton <timothy_horton@apple.com> 2 3 Call setCollectsTimingData only once, and before making any {CF,NS}URLConnections 4 https://bugs.webkit.org/show_bug.cgi?id=136731 5 <rdar://problem/18252844> 6 7 Reviewed by Simon Fraser. 8 9 * platform/network/cf/ResourceHandleCFNet.cpp: 10 (WebCore::ResourceHandle::start): 11 Move setCollectsTimingData to before createCFURLConnection, so the first connection 12 has timing data associated with it. 13 14 * platform/network/mac/ResourceHandleMac.mm: 15 (WebCore::ResourceHandle::createNSURLConnection): 16 Move setCollectsTimingData to before we create our NSURLConnection, so the first connection 17 has timing data associated with it. 18 Use setCollectsTimingData instead of the NSURLConnection SPI directly. 19 20 (WebCore::ResourceHandle::setCollectsTimingData): 21 Only call _setCollectsTimingData once. 22 1 23 2014-09-10 Enrica Casucci <enrica@apple.com> 2 24 -
trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
r171858 r173501 250 250 bool shouldUseCredentialStorage = !client() || client()->shouldUseCredentialStorage(this); 251 251 252 #if ENABLE(WEB_TIMING) 253 setCollectsTimingData(); 254 #endif 255 252 256 createCFURLConnection(shouldUseCredentialStorage, d->m_shouldContentSniff, SchedulingBehavior::Asynchronous, client()->connectionProperties(this).get()); 253 257 … … 256 260 257 261 LOG(Network, "CFNet - Starting URL %s (handle=%p, conn=%p)", firstRequest().url().string().utf8().data(), this, d->m_connection.get()); 258 259 #if ENABLE(WEB_TIMING)260 setCollectsTimingData();261 #endif262 262 263 263 return true; -
trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm
r173192 r173501 145 145 #endif 146 146 { 147 #if ENABLE(WEB_TIMING) 148 setCollectsTimingData(); 149 #endif 150 147 151 // Credentials for ftp can only be passed in URL, the connection:didReceiveAuthenticationChallenge: delegate call won't be made. 148 152 if ((!d->m_user.isEmpty() || !d->m_pass.isEmpty()) && !firstRequest().url().protocolIsInHTTPFamily()) { … … 222 226 #endif 223 227 d->m_connection = adoptNS([[NSURLConnection alloc] _initWithRequest:nsRequest delegate:delegate usesCache:usesCache maxContentLength:0 startImmediately:NO connectionProperties:propertyDictionary]); 224 #if ENABLE(WEB_TIMING)225 [NSURLConnection _setCollectsTimingData:YES];226 #endif227 228 } 228 229 … … 759 760 void ResourceHandle::setCollectsTimingData() 760 761 { 761 [NSURLConnection _setCollectsTimingData:YES]; 762 static dispatch_once_t onceToken; 763 dispatch_once(&onceToken, ^{ 764 [NSURLConnection _setCollectsTimingData:YES]; 765 }); 762 766 } 763 767
Note:
See TracChangeset
for help on using the changeset viewer.