Changeset 187466 in webkit
- Timestamp:
- Jul 27, 2015 5:06:32 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r187463 r187466 1 2015-07-27 Brady Eidson <beidson@apple.com> 2 3 Crash in WebCore::DocumentLoader::willSendRequest() with ContentFilter and AppCache. 4 <rdar://problem/21960398> and https://bugs.webkit.org/show_bug.cgi?id=147339 5 6 Reviewed by Alexey Proskuryakov. 7 8 No new tests (Not yet proven to be possible to test this). 9 10 * loader/DocumentLoader.cpp: 11 (WebCore::DocumentLoader::willSendRequest): Grab the identifier from the CachedResource directly, not from the null ResourceLoader. 12 (WebCore::DocumentLoader::continueAfterNavigationPolicy): Null check the ResourceLoader, as it can definitely be gone by this point. 13 14 * loader/cache/CachedResource.cpp: 15 (WebCore::CachedResource::clearLoader): Save off the identifier for later use. 16 * loader/cache/CachedResource.h: 17 (WebCore::CachedResource::identifierForLoadWithoutResourceLoader): Expose the identifier that the ResourceLoader had when it went away. 18 1 19 2015-07-27 Said Abou-Hallawa <sabouhallawa@apple.com> 2 20 -
trunk/Source/WebCore/loader/DocumentLoader.cpp
r186957 r187466 551 551 ASSERT(!m_substituteData.isValid()); 552 552 m_applicationCacheHost->maybeLoadMainResourceForRedirect(newRequest, m_substituteData); 553 if (m_substituteData.isValid()) 554 m_identifierForLoadWithoutResourceLoader = mainResourceLoader()->identifier(); 553 if (m_substituteData.isValid()) { 554 RELEASE_ASSERT(m_mainResource); 555 m_identifierForLoadWithoutResourceLoader = m_mainResource->identifierForLoadWithoutResourceLoader(); 556 } 555 557 } 556 558 … … 582 584 // but prevent the ResourceLoader from sending ResourceLoadNotifier callbacks. 583 585 RefPtr<ResourceLoader> resourceLoader = mainResourceLoader(); 584 ASSERT(resourceLoader->shouldSendResourceLoadCallbacks()); 585 resourceLoader->setSendCallbackPolicy(DoNotSendCallbacks); 586 if (resourceLoader) { 587 ASSERT(resourceLoader->shouldSendResourceLoadCallbacks()); 588 resourceLoader->setSendCallbackPolicy(DoNotSendCallbacks); 589 } 590 586 591 clearMainResource(); 587 resourceLoader->setSendCallbackPolicy(SendCallbacks); 592 593 if (resourceLoader) 594 resourceLoader->setSendCallbackPolicy(SendCallbacks); 588 595 handleSubstituteDataLoadSoon(); 589 596 } -
trunk/Source/WebCore/loader/cache/CachedResource.cpp
r186279 r187466 406 406 { 407 407 ASSERT(m_loader); 408 m_identifierForLoadWithoutResourceLoader = m_loader->identifier(); 408 409 m_loader = nullptr; 409 410 deleteIfPossible(); -
trunk/Source/WebCore/loader/cache/CachedResource.h
r186272 r187466 261 261 #endif 262 262 263 unsigned long identifierForLoadWithoutResourceLoader() const { return m_identifierForLoadWithoutResourceLoader; } 264 263 265 protected: 264 266 void setEncodedSize(unsigned); … … 342 344 343 345 RedirectChainCacheStatus m_redirectChainCacheStatus; 346 347 unsigned long m_identifierForLoadWithoutResourceLoader { 0 }; 344 348 }; 345 349
Note: See TracChangeset
for help on using the changeset viewer.