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

Issue 2649143003: PaymentRequest: The currencySystem should be non-nullable. (Closed)

Created:
3 years, 11 months ago by zino
Modified:
3 years, 11 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, gogerald+paymentswatch_chromium.org, Aaron Boodman, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, haraken, rouslan+payments_chromium.org, agrieve+watch_chromium.org, blink-reviews, darin (slow to review), sebsg+paymentswatch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PaymentRequest: The currencySystem should be non-nullable. The currencySystem attribute is defined in PaymentCurrencyAmount interface to indicate the currency system that the currency identifier belongs to. The spec[1] defines it as non-nullable, and our current IDL implementation follows it well. However, its mapping value for mojom is nullable. It looks strange. As a result, in browser side, we are unnecessarily checking whether the value is null or not everytime. Therefore, This CL is fixing the value as non-nullable and remove unncessary checks. This is initiated from Tommy's comment(tommyt@opera.com) on the code review[2]. [1] https://w3c.github.io/browser-payment-api/#paymentcurrencyamount [2] https://codereview.chromium.org/2646313002/#msg5 BUG=none Review-Url: https://codereview.chromium.org/2649143003 Cr-Commit-Position: refs/heads/master@{#445725} Committed: https://chromium.googlesource.com/chromium/src/+/427645407dc20735347e185b9875b04a26c92f14

Patch Set 1 #

Patch Set 2 : fix bot error #

Patch Set 3 : PaymentRequest: The currencySystem should be non-nullable. #

Patch Set 4 : PaymentRequest: The currencySystem should be non-nullable. #

Messages

Total messages: 35 (23 generated)
zino
PTAL.
3 years, 11 months ago (2017-01-23 13:44:41 UTC) #5
please use gerrit instead
Hold on, how is this value non-nullable? :-D I thought a developer can write currencySystem:null ...
3 years, 11 months ago (2017-01-23 13:49:26 UTC) #8
please use gerrit instead
Filed https://github.com/w3c/browser-payment-api/issues/408 to discuss this with the working group.
3 years, 11 months ago (2017-01-23 13:52:45 UTC) #9
tommyt
I agree with Rouslan. It makes sense to keep this field optional, but the string ...
3 years, 11 months ago (2017-01-23 13:52:47 UTC) #10
please use gerrit instead
LGTM given the discussion in W3C github. Looks like only "DOMString?" type allows null values, ...
3 years, 11 months ago (2017-01-23 14:30:53 UTC) #11
zino
On 2017/01/23 13:49:26, rouslan wrote: > Hold on, how is this value non-nullable? :-D I ...
3 years, 11 months ago (2017-01-23 14:39:33 UTC) #12
zino
Ah, sorry, I didn't see your previous comment. Thanks! I'll fix this patch again.
3 years, 11 months ago (2017-01-23 14:40:38 UTC) #13
tommyt
On 2017/01/23 14:30:53, rouslan wrote: > LGTM given the discussion in W3C github. Looks like ...
3 years, 11 months ago (2017-01-23 14:46:39 UTC) #14
zino
+Tom Sepez for mojom file.
3 years, 11 months ago (2017-01-23 15:04:53 UTC) #20
Tom Sepez
lgtm
3 years, 11 months ago (2017-01-23 18:26:13 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2649143003/60001
3 years, 11 months ago (2017-01-24 14:29:59 UTC) #32
commit-bot: I haz the power
3 years, 11 months ago (2017-01-24 14:43:31 UTC) #35
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/427645407dc20735347e185b9875...

Powered by Google App Engine
This is Rietveld 408576698