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

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

Issue 2705293010: PaymentApp: Implement respondWith() in PaymentRequestEvent. (blink side) (Closed)
Patch Set: PaymentApp: Implement respondWith() in PaymentRequestEvent. (blink side) Created 3 years, 9 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/PaymentAppRequestConversion.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.cpp b/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.cpp
index abe0dd5bfc87237d34009d5a6fb62a45ba1a9ac0..864bae6fec843fb85d69d712c54d70f9c02f85d4 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.cpp
@@ -86,7 +86,13 @@ PaymentMethodData toPaymentMethodData(
PaymentAppRequest PaymentAppRequestConversion::toPaymentAppRequest(
ScriptState* scriptState,
const WebPaymentAppRequest& webAppRequest) {
+ DCHECK(scriptState);
+
PaymentAppRequest appRequest;
+ if (!scriptState->contextIsValid())
+ return appRequest;
+
+ ScriptState::Scope scope(scriptState);
appRequest.setOrigin(webAppRequest.origin);
HeapVector<PaymentMethodData> methodData;
« no previous file with comments | « third_party/WebKit/Source/modules/payments/BUILD.gn ('k') | third_party/WebKit/Source/modules/payments/PaymentAppResponse.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698