Changeset 233842 in webkit
- Timestamp:
- Jul 15, 2018 10:22:36 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r233828 r233842 1 2018-07-15 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [SOUP] http/tests/misc/bubble-drag-events.html crashes 4 https://bugs.webkit.org/show_bug.cgi?id=182352 5 6 Reviewed by Youenn Fablet. 7 8 PingLoad is not refcounted and deletes itself when the load finishes. The problem is that the network data 9 task can also finish the load, causing the PingLoad to be deleted early. We tried to fix it in r233032 in the 10 network data task soup implementation, but it caused regressions. 11 12 * NetworkProcess/PingLoad.cpp: 13 (WebKit::PingLoad::didReceiveChallenge): Create a weak ref for the ping load before calling the operation completion 14 handler and return early after the completion handler if it was deleted. 15 (WebKit::PingLoad::didReceiveResponseNetworkSession): Ditto. 16 * NetworkProcess/PingLoad.h: 17 * NetworkProcess/soup/NetworkDataTaskSoup.cpp: 18 (WebKit::NetworkDataTaskSoup::continueAuthenticate): Revert r233032. 19 1 20 2018-07-13 Timothy Hatcher <timothy@apple.com> 2 21 -
trunk/Source/WebKit/NetworkProcess/PingLoad.cpp
r233720 r233842 115 115 { 116 116 RELEASE_LOG_IF_ALLOWED("didReceiveChallenge"); 117 auto weakThis = makeWeakPtr(*this); 117 118 completionHandler(AuthenticationChallengeDisposition::Cancel, { }); 119 if (!weakThis) 120 return; 118 121 didFinish(ResourceError { String(), 0, currentURL(), "Failed HTTP authentication"_s, ResourceError::Type::AccessControl }); 119 122 } … … 122 125 { 123 126 RELEASE_LOG_IF_ALLOWED("didReceiveResponseNetworkSession - httpStatusCode: %d", response.httpStatusCode()); 127 auto weakThis = makeWeakPtr(*this); 124 128 completionHandler(PolicyAction::Ignore); 129 if (!weakThis) 130 return; 125 131 didFinish({ }, response); 126 132 } -
trunk/Source/WebKit/NetworkProcess/PingLoad.h
r233277 r233842 32 32 #include <wtf/CompletionHandler.h> 33 33 #include <wtf/UniqueRef.h> 34 #include <wtf/WeakPtr.h> 34 35 35 36 namespace WebCore { … … 44 45 class NetworkLoadChecker; 45 46 46 class PingLoad final : p rivate NetworkDataTaskClient {47 class PingLoad final : public CanMakeWeakPtr<PingLoad>, private NetworkDataTaskClient { 47 48 public: 48 49 PingLoad(NetworkResourceLoadParameters&&, CompletionHandler<void(const WebCore::ResourceError&, const WebCore::ResourceResponse&)>&&); -
trunk/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
r233668 r233842 528 528 529 529 if (disposition == AuthenticationChallengeDisposition::Cancel) { 530 invalidateAndCancel(); 530 cancel(); 531 didFail(cancelledError(m_soupRequest.get())); 531 532 return; 532 533 }
Note: See TracChangeset
for help on using the changeset viewer.