From 596f1d8426a9773998def7683eeec8f3078106c0 Mon Sep 17 00:00:00 2001 From: stelar7 Date: Wed, 8 Jan 2025 23:18:56 +0100 Subject: [PATCH] LibWeb: Move IDBDatabase::close out of line --- Libraries/LibWeb/IndexedDB/IDBDatabase.cpp | 8 ++++++++ Libraries/LibWeb/IndexedDB/IDBDatabase.h | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Libraries/LibWeb/IndexedDB/IDBDatabase.cpp b/Libraries/LibWeb/IndexedDB/IDBDatabase.cpp index 361ddcbf1a8..fa0c3487f90 100644 --- a/Libraries/LibWeb/IndexedDB/IDBDatabase.cpp +++ b/Libraries/LibWeb/IndexedDB/IDBDatabase.cpp @@ -8,6 +8,7 @@ #include #include #include +#include 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); +} + } diff --git a/Libraries/LibWeb/IndexedDB/IDBDatabase.h b/Libraries/LibWeb/IndexedDB/IDBDatabase.h index e1085f890d2..8504f213eab 100644 --- a/Libraries/LibWeb/IndexedDB/IDBDatabase.h +++ b/Libraries/LibWeb/IndexedDB/IDBDatabase.h @@ -10,7 +10,6 @@ #include #include #include -#include #include #include @@ -45,12 +44,7 @@ public: [[nodiscard]] ConnectionState state() const { return m_state; } [[nodiscard]] GC::Ref 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();