mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
LibWeb: Make SubtleCrypto GC-allocated
This commit is contained in:
parent
2ac8e3db3a
commit
7a9b8ced38
Notes:
sideshowbarker
2024-07-17 07:25:45 +09:00
Author: https://github.com/awesomekling
Commit: 7a9b8ced38
Pull-request: https://github.com/SerenityOS/serenity/pull/14816
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg ✅
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