mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +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
|
@ -92,7 +92,6 @@ JS::NonnullGCPtr<Window> Window::create_with_document(DOM::Document& document)
|
|||
|
||||
Window::Window(JS::Realm& realm)
|
||||
: DOM::EventTarget(realm)
|
||||
, m_crypto(Crypto::Crypto::create())
|
||||
{
|
||||
// FIXME: Should this be WindowPrototype?
|
||||
}
|
||||
|
@ -100,7 +99,6 @@ Window::Window(JS::Realm& realm)
|
|||
Window::Window(DOM::Document& document)
|
||||
: DOM::EventTarget(document.shape().realm())
|
||||
, m_associated_document(document)
|
||||
, m_crypto(Crypto::Crypto::create())
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -766,6 +764,8 @@ void Window::initialize(JS::Realm& realm)
|
|||
|
||||
Object::set_prototype(&ensure_web_prototype<Bindings::WindowPrototype>("Window"));
|
||||
|
||||
m_crypto = Crypto::Crypto::create(*this);
|
||||
|
||||
// FIXME: These should be native accessors, not properties
|
||||
define_direct_property("window", this, JS::Attribute::Enumerable);
|
||||
define_direct_property("frames", this, JS::Attribute::Enumerable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue