Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1498)

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp

Issue 2463453002: "Fix" remaining connection error handlers in Blink (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
index 495f73e805dc13310cd77b78dbb345844168c341..7c6eb2818dd0c12214a86b9fadcada0c95b52645 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -28,6 +28,7 @@
#include "mojo/public/cpp/bindings/wtf_array.h"
#include "platform/mojo/MojoHelper.h"
#include "public/platform/InterfaceProvider.h"
+#include "public/platform/Platform.h"
#include "public/platform/WebTraceLocation.h"
#include "wtf/HashSet.h"
#include <utility>
@@ -792,6 +793,11 @@ void PaymentRequest::OnPaymentResponse(
}
void PaymentRequest::OnError(mojo::PaymentErrorReason error) {
+ if (!Platform::current()) {
+ // TODO(rockot): Clean this up once renderer shutdown sequence is fixed.
+ return;
+ }
+
bool isError = false;
ExceptionCode ec = UnknownError;
String message;

Powered by Google App Engine
This is Rietveld 408576698