Lifetime of HTMLMediaElement is not properly handled in asynchronous actions
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 Dec 2018 01:52:59 +0000 (01:52 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 2 Dec 2018 01:52:59 +0000 (01:52 +0000)
commit951aa34769042766775d669c2e6719a5c426250b
treead8b81f16c2a1016591557b0847b28794d2ced21
parent2bd0886441cef2936ad8f6706653aafe319f55e7
Lifetime of HTMLMediaElement is not properly handled in asynchronous actions
https://bugs.webkit.org/show_bug.cgi?id=192087
<rdar://problem/45975230>

Reviewed by Dean Jackson.

The HTMLMediaElement performs operations that allow arbitrary JavaScript to run. We need to make
sure the active media element is protected until those calls complete.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::didFinishInsertingNode):
(WebCore::HTMLMediaElement::exitFullscreen):
(WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured):
(WebCore::HTMLMediaElement::scheduleConfigureTextTracks):
(WebCore::HTMLMediaElement::scheduleMediaEngineWasUpdated):
(WebCore::HTMLMediaElement::scheduleUpdatePlayState):
(WebCore::HTMLMediaElement::scheduleUpdateMediaState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp