LibJS+LibWeb: Allow instantiating DataBlock with an external buffer

This requires the minimal API exposed by ByteBuffer, allowing external
users to implement them as needed instead of being forced to use a
ByteBuffer.
This commit is contained in:
Ali Mohammad Pur
2026-04-04 19:25:48 +02:00
committed by Ali Mohammad Pur
parent 0a7bef349d
commit 0bb987e809
Notes: github-actions[bot] 2026-05-10 14:43:40 +00:00
22 changed files with 163 additions and 68 deletions

View File

@@ -104,7 +104,7 @@ WebIDL::ExceptionOr<void> RsaKeyAlgorithm::set_public_exponent(::Crypto::Unsigne
// The BigInteger typedef from the WebCrypto spec requires the bytes in the Uint8Array be ordered in Big Endian
m_public_exponent = TRY(JS::Uint8Array::create(realm, result.size()));
m_public_exponent->viewed_array_buffer()->buffer().overwrite(0, result.data(), result.size());
m_public_exponent->viewed_array_buffer()->overwrite(0, result.data(), result.size());
return {};
}