From a65110ec0677eba8771cc8a5067ecfecc2cd529d Mon Sep 17 00:00:00 2001 From: devgianlu Date: Fri, 13 Dec 2024 21:40:16 +0100 Subject: [PATCH] LibWeb: Define `HmacKeyAlgorithm` native accessor for `length` property The property was not accessible because it was not exposed to JS. The issue was discovered while implementing `wrapKey` and `unwrapKey` in the next commits. --- Libraries/LibWeb/Crypto/KeyAlgorithms.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/LibWeb/Crypto/KeyAlgorithms.cpp b/Libraries/LibWeb/Crypto/KeyAlgorithms.cpp index f62b727b862..999d6d73af3 100644 --- a/Libraries/LibWeb/Crypto/KeyAlgorithms.cpp +++ b/Libraries/LibWeb/Crypto/KeyAlgorithms.cpp @@ -225,6 +225,7 @@ void HmacKeyAlgorithm::initialize(JS::Realm& realm) { Base::initialize(realm); define_native_accessor(realm, "hash", hash_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); + define_native_accessor(realm, "length", length_getter, {}, JS::Attribute::Enumerable | JS::Attribute::Configurable); } void HmacKeyAlgorithm::visit_edges(JS::Cell::Visitor& visitor)