[Payment Request] PaymentResponse should be a ContextDestructionObserver
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Oct 2018 19:37:17 +0000 (19:37 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Oct 2018 19:37:17 +0000 (19:37 +0000)
commitb2bdfcb0b36e77092b1fa13245146c7f309e390f
tree76da7c640afec78d0ce513e8bf8bba91f0ec5ea8
parent14da417e48b3a5f1a37fd66d524048e5aaea0590
[Payment Request] PaymentResponse should be a ContextDestructionObserver
https://bugs.webkit.org/show_bug.cgi?id=190558

Reviewed by Alex Christensen.

Make PaymentResponse a ContextDestructionObserver so it has a ScriptExecutionContext to
return for its override of EventTarget::scriptExecutionContext(). Do this instead of
downcasting m_request to an ActiveDOMObject to ask for its context.

* Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::accept):
* Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::PaymentResponse):
(WebCore::PaymentResponse::scriptExecutionContext const): Deleted.
* Modules/paymentrequest/PaymentResponse.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp
Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp
Source/WebCore/Modules/paymentrequest/PaymentResponse.h