Crash in layout test /media/video-buffered-range-contains-currentTime.html
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jul 2016 23:49:15 +0000 (23:49 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jul 2016 23:49:15 +0000 (23:49 +0000)
commita2ccdc30e19851d96184685c0af4826c436e1064
treecf45a68bacae73d470384ac921f24a2ea8663599
parent5a2722c3e1cace44a4d2468b9135fb04c67ee9dc
Crash in layout test /media/video-buffered-range-contains-currentTime.html
https://bugs.webkit.org/show_bug.cgi?id=159109
<rdar://problem/26535750>

Reviewed by Alex Christensen.

Protect against _dataTasks being mutated and accessed on multiple simultaneous threads with a Lock.

* platform/network/cocoa/WebCoreNSURLSession.h:
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession dealloc]):
(-[WebCoreNSURLSession taskCompleted:]):
(-[WebCoreNSURLSession finishTasksAndInvalidate]):
(-[WebCoreNSURLSession invalidateAndCancel]):
(-[WebCoreNSURLSession getTasksWithCompletionHandler:]):
(-[WebCoreNSURLSession getAllTasksWithCompletionHandler:]):
(-[WebCoreNSURLSession dataTaskWithRequest:]):
(-[WebCoreNSURLSession dataTaskWithURL:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h
Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm