1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibWeb: Make SubtleCrypto GC-allocated

This commit is contained in:
Andreas Kling 2022-09-03 19:59:53 +02:00
parent 2ac8e3db3a
commit 7a9b8ced38
8 changed files with 38 additions and 29 deletions

View file

@ -14,11 +14,16 @@
namespace Web::Crypto {
Crypto::Crypto()
: m_subtle(SubtleCrypto::create())
Crypto::Crypto(HTML::Window& window)
: m_subtle(*SubtleCrypto::create(window))
{
}
JS::NonnullGCPtr<SubtleCrypto> Crypto::subtle() const
{
return *m_subtle;
}
// https://w3c.github.io/webcrypto/#dfn-Crypto-method-getRandomValues
DOM::ExceptionOr<JS::Value> Crypto::get_random_values(JS::Value array) const
{