mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb/IDB: Dont move away the name when creating an Index
This commit is contained in:
parent
f3a31c98ea
commit
0ed71d87ca
|
|
@ -13,14 +13,14 @@ GC_DEFINE_ALLOCATOR(Index);
|
|||
|
||||
Index::~Index() = default;
|
||||
|
||||
GC::Ref<Index> Index::create(JS::Realm& realm, GC::Ref<ObjectStore> store, String name, KeyPath const& key_path, bool unique, bool multi_entry)
|
||||
GC::Ref<Index> Index::create(JS::Realm& realm, GC::Ref<ObjectStore> store, String const& name, KeyPath const& key_path, bool unique, bool multi_entry)
|
||||
{
|
||||
return realm.create<Index>(store, name, key_path, unique, multi_entry);
|
||||
}
|
||||
|
||||
Index::Index(GC::Ref<ObjectStore> store, String name, KeyPath const& key_path, bool unique, bool multi_entry)
|
||||
Index::Index(GC::Ref<ObjectStore> store, String const& name, KeyPath const& key_path, bool unique, bool multi_entry)
|
||||
: m_object_store(store)
|
||||
, m_name(move(name))
|
||||
, m_name(name)
|
||||
, m_unique(unique)
|
||||
, m_multi_entry(multi_entry)
|
||||
, m_key_path(key_path)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class Index : public JS::Cell {
|
|||
GC_DECLARE_ALLOCATOR(Index);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static GC::Ref<Index> create(JS::Realm&, GC::Ref<ObjectStore>, String, KeyPath const&, bool, bool);
|
||||
[[nodiscard]] static GC::Ref<Index> create(JS::Realm&, GC::Ref<ObjectStore>, String const&, KeyPath const&, bool, bool);
|
||||
virtual ~Index();
|
||||
|
||||
void set_name(String name);
|
||||
|
|
@ -45,7 +45,7 @@ protected:
|
|||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
private:
|
||||
Index(GC::Ref<ObjectStore>, String, KeyPath const&, bool, bool);
|
||||
Index(GC::Ref<ObjectStore>, String const&, KeyPath const&, bool, bool);
|
||||
|
||||
// An index [...] has a referenced object store.
|
||||
GC::Ref<ObjectStore> m_object_store;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user