Index: third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp |
diff --git a/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp b/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp |
index 2da969b6564dcf4671b54b3554536e00ca35e578..b680bf9d12722e75057c13bb5d59a849ea59fb4e 100644 |
--- a/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp |
+++ b/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp |
@@ -11,6 +11,7 @@ |
#include "bindings/core/v8/ScriptPromiseResolver.h" |
#include "bindings/core/v8/V8BindingForCore.h" |
#include "core/dom/DOMException.h" |
+#include "core/inspector/ConsoleMessage.h" |
#include "modules/payments/PaymentInstrument.h" |
#include "modules/payments/PaymentManager.h" |
#include "platform/wtf/Vector.h" |
@@ -46,6 +47,19 @@ bool rejectError(ScriptPromiseResolver* resolver, |
resolver->Reject(DOMException::Create( |
kNotFoundError, "Fetch or decode instrument icon failed")); |
return true; |
+ case payments::mojom::blink::PaymentHandlerStatus:: |
+ FETCH_PAYMENT_APP_INFO_FAILED: |
+ // FETCH_PAYMENT_APP_INFO_FAILED indicates everything works well except |
+ // fetching payment app's manifest. The alternative value for the payment |
+ // app will be used in this case, so only show warnning message instead of |
+ // reject the promise. |
+ ExecutionContext* context = |
+ ExecutionContext::From(resolver->GetScriptState()); |
+ context->AddConsoleMessage( |
+ ConsoleMessage::Create(kJSMessageSource, kWarningMessageLevel, |
+ "Fetch payment app's info (manifest or the " |
+ "field in the manifest) failed.")); |
please use gerrit instead
2017/06/30 15:43:30
A couple of comments:
1) Payment app is not the t
gogerald1
2017/06/30 16:25:09
Done.
|
+ return false; |
} |
NOTREACHED(); |
return false; |