/* * Copyright (c) 2024-2025, Shannon Booth * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include #include namespace Web::StorageAPI { // https://storage.spec.whatwg.org/#storage-shed // A storage shed is a map of storage keys to storage shelves. It is initially empty. class StorageShed : public GC::Cell { GC_CELL(StorageShed, GC::Cell); GC_DECLARE_ALLOCATOR(StorageShed); public: static GC::Ref create(GC::Heap& heap) { return heap.allocate(); } GC::Ptr obtain_a_storage_shelf(HTML::EnvironmentSettingsObject&, StorageType); virtual void visit_edges(GC::Cell::Visitor& visitor) override; private: StorageShed() = default; OrderedHashMap> m_data; }; }