diff --git a/Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.cpp b/Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.cpp index 2b5e83644aa..db8a9aace34 100644 --- a/Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.cpp +++ b/Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.cpp @@ -27,6 +27,11 @@ void IDBOpenDBRequest::initialize(JS::Realm& realm) WEB_SET_PROTOTYPE_FOR_INTERFACE(IDBOpenDBRequest); } +JS::NonnullGCPtr IDBOpenDBRequest::create(JS::Realm& realm) +{ + return realm.heap().allocate(realm, realm); +} + // https://w3c.github.io/IndexedDB/#dom-idbopendbrequest-onblocked void IDBOpenDBRequest::set_onblocked(WebIDL::CallbackType* event_handler) { diff --git a/Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.h b/Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.h index b908dd9b4e9..adbdd8013de 100644 --- a/Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.h +++ b/Userland/Libraries/LibWeb/IndexedDB/IDBOpenDBRequest.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2024, Shannon Booth * Copyright (c) 2024, Jamie Mansfield + * Copyright (c) 2024, stelar7 * * SPDX-License-Identifier: BSD-2-Clause */ @@ -19,6 +20,8 @@ class IDBOpenDBRequest : public IDBRequest { public: virtual ~IDBOpenDBRequest(); + [[nodiscard]] static JS::NonnullGCPtr create(JS::Realm&); + void set_onblocked(WebIDL::CallbackType*); WebIDL::CallbackType* onblocked(); void set_onupgradeneeded(WebIDL::CallbackType*);