LibWeb: Move IDBDatabase::close out of line

This commit is contained in:
stelar7 2025-01-08 23:18:56 +01:00 committed by Jelle Raaijmakers
parent 47b8a015a7
commit 596f1d8426
Notes: github-actions[bot] 2025-01-14 22:47:34 +00:00
2 changed files with 9 additions and 7 deletions

View file

@ -8,6 +8,7 @@
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/HTML/EventNames.h>
#include <LibWeb/IndexedDB/IDBDatabase.h>
#include <LibWeb/IndexedDB/Internal/Algorithms.h>
namespace Web::IndexedDB {
@ -82,4 +83,11 @@ WebIDL::CallbackType* IDBDatabase::onversionchange()
return event_handler_attribute(HTML::EventNames::versionchange);
}
// https://w3c.github.io/IndexedDB/#dom-idbdatabase-close
void IDBDatabase::close()
{
// 1. Run close a database connection with this connection.
close_a_database_connection(*this);
}
}

View file

@ -10,7 +10,6 @@
#include <LibWeb/DOM/EventTarget.h>
#include <LibWeb/HTML/DOMStringList.h>
#include <LibWeb/IndexedDB/IDBRequest.h>
#include <LibWeb/IndexedDB/Internal/Algorithms.h>
#include <LibWeb/IndexedDB/Internal/Database.h>
#include <LibWeb/StorageAPI/StorageKey.h>
@ -45,12 +44,7 @@ public:
[[nodiscard]] ConnectionState state() const { return m_state; }
[[nodiscard]] GC::Ref<Database> associated_database() { return m_associated_database; }
// https://w3c.github.io/IndexedDB/#dom-idbdatabase-close
void close()
{
// 1. Run close a database connection with this connection.
close_a_database_connection(*this);
}
void close();
void set_onabort(WebIDL::CallbackType*);
WebIDL::CallbackType* onabort();