| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Use the native KeyObject FunctionTemplate brand check instead of probing slot access and catching ERR_INVALID_THIS. Keep a private-field fast path for ordinary same-realm KeyObjects. Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Use the native CryptoKey FunctionTemplate brand check instead of probing slot access and catching ERR_INVALID_THIS. Keep a private-field fast path for ordinary same-realm CryptoKeys. Signed-off-by: Filip Skokan <panva.ip@gmail.com>
|
Review requested:
|
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #65503 +/- ##
==========================================
- Coverage 90.14% 90.13% -0.02%
==========================================
Files 751 751
Lines 252521 252701 +180
Branches 47511 47552 +41
==========================================
+ Hits 227635 227771 +136
- Misses 16192 16210 +18
- Partials 8694 8720 +26
... and 38 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
Sorry, something went wrong.
|
Is there a benchmark that reflects this? If so, this should have a benchmark CI run even if I find this entirely believable as-is :) |
Sorry, something went wrong.
We can't get benchmark results from Jenkins until nodejs/build#4374 is fixed. The results posted already use existing benchmarks ran using production build locally. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Use the native KeyObject and CryptoKey FunctionTemplate brand check instead of probing slot access and catching ERR_INVALID_THIS. Keep a private-field fast path for ordinary same-realm keys.
Before this change isKeyObject() and isCryptoKey() detected invalid objects by calling their slot getters, catching ERR_INVALID_THIS, and returning false. Because node:crypto APIs check key inputs for being key objects first this change has a positive downstream effect on every use of those APIs that isn't with a key object (e.g. PEM, DER, JWK, etc) as well as on use with key object embedded in an regular object as { key: KeyObject, ...options }
Object-form key inputs benefit more because both the options object and its key payload previously caused failed brand checks.
SubtleCrypto operations are unaffected because they use WebIDL interface conversion instead of isCryptoKey().