Changeset 199105 in webkit
- Timestamp:
- Apr 6, 2016 10:44:42 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r199103 r199105 1 2016-04-06 Jer Noble <jer.noble@apple.com> 2 3 CRASH in -[WebCoreNSURLSession taskCompleted:] 4 https://bugs.webkit.org/show_bug.cgi?id=156290 5 6 Reviewed by Eric Carlson. 7 8 Fixes currently flakily crashing http/tests/media tests. 9 10 Protect against -taskCompleted: being called multiple times by only calling 11 -taskCompleted: if the task's state is not yet NSURLSessionTaskStateCompleted. 12 Additionally, make sure to clear the task's session pointer when removing it 13 from _dataTasks, as this ensures a task that outlives its session does not 14 keep a pointer to a dealloc'd object. 15 16 * platform/network/cocoa/WebCoreNSURLSession.mm: 17 (-[WebCoreNSURLSession taskCompleted:]): 18 (-[WebCoreNSURLSessionDataTask _resource:loadFinishedWithError:]): 19 1 20 2016-04-06 Chris Dumez <cdumez@apple.com> 2 21 -
trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm
r198566 r199105 112 112 { 113 113 ASSERT(_dataTasks.contains(task)); 114 task.session = nil; 114 115 _dataTasks.remove(task); 115 116 if (!_dataTasks.isEmpty() || !_invalidated) … … 594 595 { 595 596 ASSERT_UNUSED(resource, &resource == _resource); 597 if (self.state == NSURLSessionTaskStateCompleted) 598 return; 599 self.state = NSURLSessionTaskStateCompleted; 600 596 601 RetainPtr<WebCoreNSURLSessionDataTask> strongSelf { self }; 597 602 RetainPtr<NSError> strongError { error };
Note: See TracChangeset
for help on using the changeset viewer.