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; |