[Web Payment] Correctly handle empty modifiers.
Before this patch, specifying an empty list of modifiers would crash Android PaymentRequest, because it would clear its own list of modifiers before initializing it. This patch checks that the list of modifiers is initialized before clearing it. The new test EmptyParametersTest.NoCrash crashes without the patch and passes with the patch. After this patch, specifying an empty list of modifiers does not crash Android PaymentRequest. The android_browsertests were chosen to make sure both Android and desktop behave correctly. Although WPTs could also find the bug, they currently don't run on the waterfall (neither desktop nor Android). Bug: 1022810 Change-Id: I661aa80889822a73939c5f96662dc3531689a85e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1906806 Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org> Reviewed-by:Danyao Wang <danyao@chromium.org> Cr-Commit-Position: refs/heads/master@{#713909}
Showing
Please register or sign in to comment