Skip to content

Conversation

@aduh95
Copy link
Contributor

@aduh95 aduh95 commented Jan 29, 2022

Object.getOwnPropertyDescriptor((crypto.webcrypto || crypto).constructor.prototype, 'subtle').get.name
  • Chromium: "get subtle"
  • Firefox: "get subtle"
  • Safari: "get subtle"
  • Deno: "get subtle"
  • Node.js TypeError: Cannot read properties of undefined (reading 'name')

This PR aligns Node.js with the rest of the ecosystem.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto
@nodejs-github-bot nodejs-github-bot added crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Jan 29, 2022
@aduh95 aduh95 changed the title crypto: fix webcrpto.subtle signature crypto: fix webcrypto.subtle signature Jan 29, 2022
@panva panva added the experimental Issues and PRs related to experimental features. label Jan 30, 2022
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jan 30, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 30, 2022
@nodejs-github-bot

This comment has been minimized.

@tniessen
Copy link
Member

Is this actually required by the spec or WPT?

@targos
Copy link
Member

targos commented Jan 31, 2022

It's always difficult to find things in Web IDL, but I think this is the relevant part: https://webidl.spec.whatwg.org/#dfn-attribute-getter

Let name be the string "get " prepended to attribute’s identifier.

subtle is defined as a readonly attribute: https://w3c.github.io/webcrypto/#crypto-interface

@tniessen
Copy link
Member

Thanks @targos.

@aduh95
Copy link
Contributor Author

aduh95 commented Jan 31, 2022

To whoever lands this: there's a typo in the commit message webcrpto->webcrypto.

@aduh95 aduh95 merged commit 7123a00 into nodejs:master Jan 31, 2022
@aduh95
Copy link
Contributor Author

aduh95 commented Jan 31, 2022

Landed in 7123a00

@aduh95 aduh95 deleted the webcrypto-get-subtle branch January 31, 2022 22:23
ruyadorno pushed a commit that referenced this pull request Feb 8, 2022
 PR-URL: #41761 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this pull request Mar 2, 2022
 PR-URL: #41761 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this pull request Mar 3, 2022
 PR-URL: #41761 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this pull request Mar 14, 2022
 PR-URL: #41761 Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. crypto Issues and PRs related to the crypto subsystem. experimental Issues and PRs related to experimental features. needs-ci PRs that need a full CI run.

8 participants