Changeset 245756 in webkit
- Timestamp:
- May 24, 2019 3:13:02 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r245749 r245756 1 2019-05-24 David Quesada <david_quesada@apple.com> 2 3 Crash under WebCore::TimerBase::~TimerBase after a download is canceled 4 https://bugs.webkit.org/show_bug.cgi?id=197927 5 rdar://problem/50822728 6 7 Reviewed by Ryosuke Niwa. 8 9 * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: 10 (WebKit::Download::platformCancelNetworkLoad): 11 CFNetwork makes no guarantees about what thread is used to call the completion block 12 passed to -[NSURLSessionDownloadTask cancelByProducingResumeData], and in some cases, 13 it can be called on a background queue. This eventually causes the Download to be 14 deallocated on the background queue, which triggers a release assertion failure in 15 ~TimerBase. When CFNetwork finishes canceling the download, we should move to the 16 main thread before calling didCancel(). 17 1 18 2019-05-24 Youenn Fablet <youenn@apple.com> 2 19 -
trunk/Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm
r242339 r245756 82 82 ASSERT(m_downloadTask); 83 83 [m_downloadTask cancelByProducingResumeData:^(NSData *resumeData) { 84 if (resumeData && resumeData.bytes && resumeData.length) 85 didCancel(IPC::DataReference(reinterpret_cast<const uint8_t*>(resumeData.bytes), resumeData.length)); 86 else 87 didCancel({ }); 84 callOnMainThread([this, resumeData = retainPtr(resumeData)] { 85 if (resumeData && resumeData.get().bytes && resumeData.get().length) 86 didCancel(IPC::DataReference(reinterpret_cast<const uint8_t*>(resumeData.get().bytes), resumeData.get().length)); 87 else 88 didCancel({ }); 89 }); 88 90 }]; 89 91 }
Note: See TracChangeset
for help on using the changeset viewer.