| Index: third_party/WebKit/Source/modules/payments/PaymentRequest.h
|
| diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.h b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
|
| index 3d6647d4334fe4ee138d9f4b8cc4454353f52dc6..400eea39206d235ac67c9617f2748393f6251aa0 100644
|
| --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.h
|
| +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
|
| @@ -8,6 +8,7 @@
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| #include "bindings/core/v8/ScriptValue.h"
|
| #include "bindings/core/v8/ScriptWrappable.h"
|
| +#include "core/dom/ContextLifecycleObserver.h"
|
| #include "core/events/EventTarget.h"
|
| #include "modules/ModulesExport.h"
|
| #include "modules/payments/PaymentCompleter.h"
|
| @@ -29,7 +30,7 @@ class ScriptPromiseResolver;
|
| class ScriptState;
|
| class ShippingAddress;
|
|
|
| -class MODULES_EXPORT PaymentRequest final : public RefCountedGarbageCollectedEventTargetWithInlineData<PaymentRequest>, WTF_NON_EXPORTED_BASE(public mojom::wtf::PaymentRequestClient), public PaymentCompleter {
|
| +class MODULES_EXPORT PaymentRequest final : public RefCountedGarbageCollectedEventTargetWithInlineData<PaymentRequest>, WTF_NON_EXPORTED_BASE(public mojom::wtf::PaymentRequestClient), public PaymentCompleter, public ContextLifecycleObserver {
|
| DEFINE_WRAPPERTYPEINFO();
|
| REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(PaymentRequest);
|
| USING_GARBAGE_COLLECTED_MIXIN(PaymentRequest)
|
| @@ -55,14 +56,17 @@ public:
|
| const AtomicString& interfaceName() const override;
|
| ExecutionContext* getExecutionContext() const override;
|
|
|
| - // PaymentCompleter:
|
| - ScriptPromise complete(ScriptState*, bool success) override;
|
| -
|
| DECLARE_TRACE();
|
|
|
| private:
|
| PaymentRequest(ScriptState*, const Vector<String>& supportedMethods, const PaymentDetails&, const PaymentOptions&, const ScriptValue& data, ExceptionState&);
|
|
|
| + // PaymentCompleter:
|
| + ScriptPromise complete(ScriptState*, bool success) override;
|
| +
|
| + // LifecycleObserver:
|
| + void contextDestroyed() override;
|
| +
|
| // mojom::wtf::PaymentRequestClient:
|
| void OnShippingAddressChange(mojom::wtf::ShippingAddressPtr) override;
|
| void OnShippingOptionChange(const String& shippingOptionId) override;
|
| @@ -73,7 +77,6 @@ private:
|
| // Clears the promise resolvers and closes the Mojo connection.
|
| void cleanUp();
|
|
|
| - RefPtr<ScriptState> m_scriptState;
|
| Vector<String> m_supportedMethods;
|
| PaymentDetails m_details;
|
| PaymentOptions m_options;
|
|
|