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.
This commit is contained in:
devgianlu
2024-12-13 21:40:16 +01:00
committed by Andreas Kling
parent 1e98fa96d7
commit a65110ec06

View File

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