mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 21:45:20 +00:00
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2024-2025, stelar7 <dudedbz@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/Bindings/IDBObjectStorePrototype.h>
|
|
#include <LibWeb/Bindings/Intrinsics.h>
|
|
#include <LibWeb/HTML/EventNames.h>
|
|
#include <LibWeb/IndexedDB/IDBObjectStore.h>
|
|
|
|
namespace Web::IndexedDB {
|
|
|
|
GC_DEFINE_ALLOCATOR(IDBObjectStore);
|
|
|
|
IDBObjectStore::~IDBObjectStore() = default;
|
|
|
|
IDBObjectStore::IDBObjectStore(JS::Realm& realm, GC::Ref<ObjectStore> store, GC::Ref<IDBTransaction> transaction)
|
|
: PlatformObject(realm)
|
|
, m_store(store)
|
|
, m_transaction(transaction)
|
|
{
|
|
}
|
|
|
|
GC::Ref<IDBObjectStore> IDBObjectStore::create(JS::Realm& realm, GC::Ref<ObjectStore> store, GC::Ref<IDBTransaction> transaction)
|
|
{
|
|
return realm.create<IDBObjectStore>(realm, store, transaction);
|
|
}
|
|
|
|
void IDBObjectStore::initialize(JS::Realm& realm)
|
|
{
|
|
Base::initialize(realm);
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(IDBObjectStore);
|
|
}
|
|
|
|
void IDBObjectStore::visit_edges(Visitor& visitor)
|
|
{
|
|
Base::visit_edges(visitor);
|
|
visitor.visit(m_store);
|
|
visitor.visit(m_transaction);
|
|
}
|
|
|
|
}
|