Index: third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp |
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp b/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp |
index b9968788d8b81a55261afe9a3416b4158c862b40..8b227cb651fae924189528f5838e10e706b802ac 100644 |
--- a/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp |
+++ b/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp |
@@ -9,6 +9,7 @@ |
#include "core/dom/DOMException.h" |
#include "modules/payments/PaymentAppManifest.h" |
#include "modules/payments/PaymentAppOption.h" |
+#include "modules/payments/PaymentInstruments.h" |
#include "modules/serviceworkers/ServiceWorkerRegistration.h" |
#include "platform/mojo/MojoHelper.h" |
#include "public/platform/InterfaceProvider.h" |
@@ -129,12 +130,20 @@ ScriptPromise PaymentAppManager::getManifest(ScriptState* scriptState) { |
return promise; |
} |
+PaymentInstruments* PaymentAppManager::instruments() { |
+ if (!m_instruments) { |
+ m_instruments = new PaymentInstruments(); |
+ } |
+ return m_instruments; |
+} |
+ |
DEFINE_TRACE(PaymentAppManager) { |
visitor->trace(m_registration); |
+ visitor->trace(m_instruments); |
} |
PaymentAppManager::PaymentAppManager(ServiceWorkerRegistration* registration) |
- : m_registration(registration) { |
+ : m_registration(registration), m_instruments(nullptr) { |
DCHECK(registration); |
Platform::current()->interfaceProvider()->getInterface( |
mojo::MakeRequest(&m_manager)); |