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

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..3a2e5f3286a511f96d4ba0b85859f65b67c46c78 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.cpp
@@ -87,6 +87,10 @@ PaymentAppRequest PaymentAppRequestConversion::toPaymentAppRequest(
ScriptState* scriptState,
const WebPaymentAppRequest& webAppRequest) {
PaymentAppRequest appRequest;
+ if (!scriptState || !scriptState->contextIsValid())
haraken 2017/03/14 16:15:51 scriptState should not be null.
zino 2017/03/16 13:47:31 Sorry, I don't understand exactly. Did you mean th
haraken 2017/03/16 15:16:52 Yeah, you can use DCHECK.
zino 2017/03/16 16:34:19 Done.
+ return appRequest;
+
+ ScriptState::Scope scope(scriptState);
appRequest.setOrigin(webAppRequest.origin);
HeapVector<PaymentMethodData> methodData;

Powered by Google App Engine
This is Rietveld 408576698