The Wayback Machine - http://web.archive.org/web/20220321200932/https://github.com/nodejs/node/pull/41761
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto: fix webcrypto.subtle signature #41761

Merged
merged 3 commits into from Jan 31, 2022
Merged

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
Contributor

@nodejs-github-bot nodejs-github-bot commented Jan 29, 2022

Review requested:

@aduh95 aduh95 changed the title crypto: fix webcrpto.subtle signature crypto: fix webcrypto.subtle signature Jan 29, 2022
panva
panva approved these changes Jan 30, 2022
@nodejs-github-bot

This comment has been hidden.

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Jan 30, 2022

@tniessen
Copy link
Member

@tniessen tniessen commented Jan 31, 2022

Is this actually required by the spec or WPT?

@targos
Copy link
Member

@targos 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

@tniessen tniessen commented Jan 31, 2022

Thanks @targos.

@aduh95
Copy link
Contributor Author

@aduh95 aduh95 commented Jan 31, 2022

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

lpinca
lpinca approved these changes Jan 31, 2022
@aduh95 aduh95 merged commit 7123a00 into nodejs:master Jan 31, 2022
55 checks passed
@aduh95
Copy link
Contributor Author

@aduh95 aduh95 commented Jan 31, 2022

Landed in 7123a00

@aduh95 aduh95 deleted the webcrypto-get-subtle branch Jan 31, 2022
ruyadorno added a commit that referenced this issue 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 added a commit that referenced this issue 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 added a commit that referenced this issue 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 added a commit that referenced this issue 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants