Changeset 19583 in webkit
- Timestamp:
- Feb 12, 2007, 3:01:01 PM (18 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r19582 r19583 1 2007-02-12 Kevin Decker <kdecker@apple.com> 2 3 Reviewed by Anders. 4 5 Fixed: <rdar://problem/4874059> REGRESSION: Painter IX:register - Crash in WebCore:: ResourceLoader::willSendRequest() 6 7 What happened here was that a WebDataSource was being dealloced *while* a load for that resource is still in progress. 8 9 * loader/FrameLoader.cpp: 10 (WebCore::FrameLoader::stopAllLoaders): Calling stopAllLoaders cancels loads and informs the frame load delegate accordingly. 11 The delegate however may decide to kick off a new provisional load as the result of the cancel. Therefore a local variable 12 for the provisional and main doucment loader is introduced, and we now only nil out the provisional loader if the local and 13 member provisional variables represent the exact same load. 14 (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Added the same check here, too. 15 1 16 2007-02-12 Lars Knoll <lars@trolltech.com> 2 17 -
trunk/WebCore/loader/FrameLoader.cpp
r19580 r19583 2102 2102 2103 2103 stopLoadingSubframes(); 2104 if (m_provisionalDocumentLoader) 2105 m_provisionalDocumentLoader->stopLoading(); 2106 if (m_documentLoader) 2107 m_documentLoader->stopLoading(); 2108 setProvisionalDocumentLoader(0); 2104 RefPtr<DocumentLoader> provisionalDocumentLoader = m_provisionalDocumentLoader; 2105 RefPtr<DocumentLoader> documentLoader = m_documentLoader; 2106 if (provisionalDocumentLoader) 2107 provisionalDocumentLoader->stopLoading(); 2108 2109 // Calling stopLoading() on the provisional loader results in a delegate callback, 2110 // which may kick off a brand new provisional load. So only nil out the provisional loader 2111 // if we're dealing with the exact same loader. 2112 if (provisionalDocumentLoader == m_provisionalDocumentLoader) 2113 setProvisionalDocumentLoader(0); 2114 2115 if (documentLoader) 2116 documentLoader->stopLoading(); 2117 2109 2118 m_client->clearArchivedResources(); 2110 2111 2119 m_inStopAllLoaders = false; 2112 2120 } … … 3362 3370 3363 3371 FrameLoadType type = m_policyLoadType; 3364 stopAllLoaders(); 3372 { 3373 RefPtr<DocumentLoader> previousProvisionalDocumentLoader = m_provisionalDocumentLoader; 3374 stopAllLoaders(); 3375 3376 // stopAllLoaders cancels loads and informs the frame load delegate accordingly. The delegate however, 3377 // may decide to kick off a new provisional load as the result of the cancel, and if it does, we need 3378 // to bail out now and avoid prematurely destroying the new provisional load in progress. 3379 if (m_provisionalDocumentLoader != previousProvisionalDocumentLoader) 3380 return; 3381 } 3382 3365 3383 setProvisionalDocumentLoader(m_policyDocumentLoader.get()); 3366 3384 m_loadType = type;
Note:
See TracChangeset
for help on using the changeset viewer.