mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb/IDB: Dont move away the name when creating an Index
This commit is contained in:
parent
f3a31c98ea
commit
0ed71d87ca
Notes:
github-actions[bot]
2025-05-06 09:17:23 +00:00
Author: https://github.com/stelar7
Commit: 0ed71d87ca
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4524
Reviewed-by: https://github.com/gmta ✅
2 changed files with 5 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue