DumpRenderTree crashed in com.apple.WebCore: WebCore::MockMediaEndpoint::generateDtls...
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Dec 2016 21:45:00 +0000 (21:45 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Dec 2016 21:45:00 +0000 (21:45 +0000)
commit10a9f1b4ebd33012bda6a6b33d891358c104d36d
tree4330e796446fe02e5149048ec4549ada7241072e
parenta70c704d2ef20605d4020c95d614b80d86005e39
DumpRenderTree crashed in com.apple.WebCore: WebCore::MockMediaEndpoint::generateDtlsInfo const + 23
https://bugs.webkit.org/show_bug.cgi?id=165486
<rdar://problem/29149588>

Reviewed by Tim Horton.

The MockMediaEndpoint can be destroyed before the task created in MockMediaEndpoint::generateDtlsInfo()
gets a chance to run, so guard it with a weak pointer.

* platform/mock/MockMediaEndpoint.cpp:
(WebCore::MockMediaEndpoint::MockMediaEndpoint):
(WebCore::MockMediaEndpoint::generateDtlsInfo):
* platform/mock/MockMediaEndpoint.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mock/MockMediaEndpoint.cpp
Source/WebCore/platform/mock/MockMediaEndpoint.h