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
Notes: github-actions[bot] 2024-12-16 10:37:02 +00:00

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)