Skip to content

Add [SameObject] to paymentManager attribute - #293

Merged
romandev merged 1 commit into
w3c:gh-pagesfrom
romandev:same_object
Apr 17, 2018
Merged

romandev merged 1 commit into
w3c:gh-pagesfrom
romandev:same_object

Conversation

@romandev

@romandev romandev commented Apr 15, 2018 •

Copy link
Copy Markdown
Member

We don't need to create a new object when accessing paymentManager
attribute. So, we just add [SameObject].

Implementation commitment:


Preview | Diff

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 15, 2018
Related spec change:
  w3c/web-based-payment-handler#293

Bug: none
Change-Id: Id7d0cad0f150a73e2932bd8f81f9e5650830a2c0
@rsolomakhin

Copy link
Copy Markdown
Collaborator

Can you also expose paymentManager in Worker context, please? This allows service workers to update instruments in background, as was our intention.

We don't need to create a new object when accessing paymentManager
attribute. So, we just add `[SameObject]`.
@romandev

Copy link
Copy Markdown
Member Author

@rsolomakhin I removed [SecureContext] in this patch. I mis-understood something. There is no reason to add [SecureContext, Exposed=(Window, Worker)] to partial interface. The original interface has already the extended attributes. partial interface's extended attribute should be a subset of original interface.

@romandev romandev changed the title Add [SecureContext, SameObject] to paymentManager attribute Add [SameObject] to paymentManager attribute Apr 16, 2018
@rsolomakhin

rsolomakhin commented Apr 16, 2018 •

Copy link
Copy Markdown
Collaborator

@romandev: I could not access the payment manager in service worker context unless I added [Exposed=(Window, Worker)] on the PaymentManager interface. No need to add Exposed to the partial interface attribute. Could you do that, please?

[
    Exposed=(Window,Worker), // Please add this line.
    RuntimeEnabled=PaymentApp,
    ConstructorCallWith=ExecutionContext
] interface PaymentManager {
    readonly attribute PaymentInstruments instruments;
    attribute DOMString userHint;
};

https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/payments/payment_manager.idl?rcl=ef6fc42bdc561722ddb2c0fbb0eec6d2f1d568ba&l=13

@romandev

Copy link
Copy Markdown
Member Author

@rsolomakhin, We already have it in current spec :)
https://w3c.github.io/payment-handler/#paymentmanager-interface

The ServiceWorkerRegistration has already [SecureContext, Exposed=(Window, Worker)] attributes.
Therefore, its members are also [SecureContext, Exposed=(Window, Worker)] unless we define it.
Am I missing something?

@rsolomakhin rsolomakhin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it's the bug in Chromium. We need to add [Exposed=(Window,Worker)] in payment_manager.idl to match the spec.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 16, 2018
Related spec change:
  w3c/web-based-payment-handler#293

Bug: 833535
Change-Id: Id7d0cad0f150a73e2932bd8f81f9e5650830a2c0
@romandev
romandev merged commit 2185538 into w3c:gh-pages Apr 17, 2018
@romandev
romandev deleted the same_object branch April 17, 2018 01:45
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 19, 2018
Related spec change:
  w3c/web-based-payment-handler#293

Bug: 833535
Change-Id: Id7d0cad0f150a73e2932bd8f81f9e5650830a2c0
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 19, 2018
Related spec change:
  w3c/web-based-payment-handler#293

Bug: 833535
Change-Id: Id7d0cad0f150a73e2932bd8f81f9e5650830a2c0
aarongable pushed a commit to chromium/chromium that referenced this pull request Apr 20, 2018
Related spec change:
  w3c/web-based-payment-handler#293

Bug: 833535
Change-Id: Id7d0cad0f150a73e2932bd8f81f9e5650830a2c0
Reviewed-on: https://chromium-review.googlesource.com/1013660
Reviewed-by: Ganggui Tang <[email protected]>
Commit-Queue: Jinho Bang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#552319}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 20, 2018
Related spec change:
  w3c/web-based-payment-handler#293

Bug: 833535
Change-Id: Id7d0cad0f150a73e2932bd8f81f9e5650830a2c0
Reviewed-on: https://chromium-review.googlesource.com/1013660
Reviewed-by: Ganggui Tang <[email protected]>
Commit-Queue: Jinho Bang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#552319}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Apr 20, 2018
Related spec change:
  w3c/web-based-payment-handler#293

Bug: 833535
Change-Id: Id7d0cad0f150a73e2932bd8f81f9e5650830a2c0
Reviewed-on: https://chromium-review.googlesource.com/1013660
Reviewed-by: Ganggui Tang <[email protected]>
Commit-Queue: Jinho Bang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#552319}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 30, 2018
…entManager and instruments attr, a=testonly

Automatic update from web-platform-testsPaymentHandler: Add [SameObject] to paymentManager and instruments attr

Related spec change:
  w3c/web-based-payment-handler#293

Bug: 833535
Change-Id: Id7d0cad0f150a73e2932bd8f81f9e5650830a2c0
Reviewed-on: https://chromium-review.googlesource.com/1013660
Reviewed-by: Ganggui Tang <[email protected]>
Commit-Queue: Jinho Bang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#552319}

--

wpt-commits: a9b3bb7e921720f364dec091d71cdc5c4aafd8dd
wpt-pr: 10482
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 2, 2019
…entManager and instruments attr, a=testonly

Automatic update from web-platform-testsPaymentHandler: Add [SameObject] to paymentManager and instruments attr

Related spec change:
  w3c/web-based-payment-handler#293

Bug: 833535
Change-Id: Id7d0cad0f150a73e2932bd8f81f9e5650830a2c0
Reviewed-on: https://chromium-review.googlesource.com/1013660
Reviewed-by: Ganggui Tang <gogeraldchromium.org>
Commit-Queue: Jinho Bang <jinho.bangsamsung.com>
Cr-Commit-Position: refs/heads/master{#552319}

--

wpt-commits: a9b3bb7e921720f364dec091d71cdc5c4aafd8dd
wpt-pr: 10482

UltraBlame original commit: ac09a7250e4a3fa0228a50cca1068a9558865390
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 3, 2019
…entManager and instruments attr, a=testonly

Automatic update from web-platform-testsPaymentHandler: Add [SameObject] to paymentManager and instruments attr

Related spec change:
  w3c/web-based-payment-handler#293

Bug: 833535
Change-Id: Id7d0cad0f150a73e2932bd8f81f9e5650830a2c0
Reviewed-on: https://chromium-review.googlesource.com/1013660
Reviewed-by: Ganggui Tang <gogeraldchromium.org>
Commit-Queue: Jinho Bang <jinho.bangsamsung.com>
Cr-Commit-Position: refs/heads/master{#552319}

--

wpt-commits: a9b3bb7e921720f364dec091d71cdc5c4aafd8dd
wpt-pr: 10482

UltraBlame original commit: ac09a7250e4a3fa0228a50cca1068a9558865390
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 3, 2019
…entManager and instruments attr, a=testonly

Automatic update from web-platform-testsPaymentHandler: Add [SameObject] to paymentManager and instruments attr

Related spec change:
  w3c/web-based-payment-handler#293

Bug: 833535
Change-Id: Id7d0cad0f150a73e2932bd8f81f9e5650830a2c0
Reviewed-on: https://chromium-review.googlesource.com/1013660
Reviewed-by: Ganggui Tang <gogeraldchromium.org>
Commit-Queue: Jinho Bang <jinho.bangsamsung.com>
Cr-Commit-Position: refs/heads/master{#552319}

--

wpt-commits: a9b3bb7e921720f364dec091d71cdc5c4aafd8dd
wpt-pr: 10482

UltraBlame original commit: ac09a7250e4a3fa0228a50cca1068a9558865390
jwidar pushed a commit to jwidar/LatencyZeroGithub that referenced this pull request Sep 16, 2025
…entManager and instruments attr, a=testonly

Automatic update from web-platform-testsPaymentHandler: Add [SameObject] to paymentManager and instruments attr

Related spec change:
  w3c/web-based-payment-handler#293

Bug: 833535
Change-Id: Id7d0cad0f150a73e2932bd8f81f9e5650830a2c0
Reviewed-on: https://chromium-review.googlesource.com/1013660
Reviewed-by: Ganggui Tang <[email protected]>
Commit-Queue: Jinho Bang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#552319}

--

wpt-commits: a9b3bb7e921720f364dec091d71cdc5c4aafd8dd
wpt-pr: 10482
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants