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:
parent
2ac8e3db3a
commit
7a9b8ced38
8 changed files with 38 additions and 29 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue