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

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

Issue 2602213002: [PaymentApp] Fix a crash when enabledMethods called. (Closed)
Patch Set: [Payment] fix a crash when enabledMethods called. Created 3 years, 12 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp b/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
index 651476f49f4b0e289f74a8d3e3cf703d3cfcc38f..49a31af2f175ae8a12930ec858f0da63623af28b 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
@@ -28,7 +28,10 @@ struct TypeConverter<PaymentAppOptionPtr, blink::PaymentAppOption> {
output->name = input.hasName() ? input.name() : WTF::emptyString();
output->icon = input.hasIcon() ? input.icon() : WTF::String();
output->id = input.hasId() ? input.id() : WTF::emptyString();
- output->enabled_methods = WTF::Vector<WTF::String>(input.enabledMethods());
+ if (input.hasEnabledMethods()) {
+ output->enabled_methods =
+ WTF::Vector<WTF::String>(input.enabledMethods());
+ }
return output;
}
};
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698