HTMLMediaElement registers wrong ScriptExecutionContext with its ActiveDOMObject...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2019 18:59:50 +0000 (18:59 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2019 18:59:50 +0000 (18:59 +0000)
commitb90f8fe4a004aab33821000d6be7ed4bd9aa1636
treebaa54655b3e02bebe59120be921726997d157bb4
parent24946e71d3707f90797d2c099e45170ad65303d5
HTMLMediaElement registers wrong ScriptExecutionContext with its ActiveDOMObject parent class
https://bugs.webkit.org/show_bug.cgi?id=194360

HTMLMediaElement registers the Document used to create it with ActiveDOMObject, when it should
really use that Document's contextDocument(). Rather than just fix this in HTMLMediaElement,
make sure that the correct document is used everywhere by adding a new ActiveDOMObject constructor
taking a Document&, and making an explicitly deleted Document* constructor to catch any new cases.

Reviewed by Geoffrey Garen.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::ApplePaySession):
* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::MediaRecorder):
* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::MediaDevices):
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::UserMediaRequest):
* Modules/notifications/Notification.cpp:
(WebCore::Notification::Notification):
* Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::PaymentRequest):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::WebAnimation):
* css/FontFaceSet.cpp:
(WebCore::FontFaceSet::FontFaceSet):
* dom/ActiveDOMObject.cpp:
(WebCore::ActiveDOMObject::ActiveDOMObject):
* dom/ActiveDOMObject.h:
* dom/Document.h:
(WebCore::ActiveDOMObject::ActiveDOMObject):
* html/HTMLMarqueeElement.cpp:
(WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::HTMLSourceElement):
* page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::IntersectionObserver):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/applepay/ApplePaySession.cpp
Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
Source/WebCore/Modules/mediastream/MediaDevices.cpp
Source/WebCore/Modules/mediastream/UserMediaRequest.cpp
Source/WebCore/Modules/notifications/Notification.cpp
Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp
Source/WebCore/Modules/webaudio/AudioContext.cpp
Source/WebCore/animation/WebAnimation.cpp
Source/WebCore/css/FontFaceSet.cpp
Source/WebCore/dom/ActiveDOMObject.cpp
Source/WebCore/dom/ActiveDOMObject.h
Source/WebCore/dom/Document.h
Source/WebCore/html/HTMLMarqueeElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLSourceElement.cpp
Source/WebCore/page/IntersectionObserver.cpp