Skip to content

Commit 1a3cd21

Browse files
panvajuanarbol
authored andcommitted
crypto: add CryptoKey Symbol.toStringTag
closes #45987 PR-URL: #46042 Backport-PR-URL: #46340 Fixes: #45987 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
1 parent 742c5e2 commit 1a3cd21

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/internal/crypto/keys.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,15 @@ class InternalCryptoKey {
750750
this[kExtractable] = extractable;
751751
}
752752
}
753+
754+
ObjectDefineProperties(CryptoKey.prototype, {
755+
[SymbolToStringTag]: {
756+
__proto__: null,
757+
configurable: true,
758+
value: 'CryptoKey',
759+
},
760+
});
761+
753762
InternalCryptoKey.prototype.constructor = CryptoKey;
754763
ObjectSetPrototypeOf(InternalCryptoKey.prototype, CryptoKey.prototype);
755764

0 commit comments

Comments
 (0)