/* * Copyright (c) 2023, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace Web::FileAPI { // https://w3c.github.io/FileAPI/#blob-url-entry struct BlobURLEntry { JS::Handle object; // FIXME: This could also be a MediaSource after we implement MSE. JS::Handle environment; }; // https://w3c.github.io/FileAPI/#BlobURLStore using BlobURLStore = HashMap; BlobURLStore& blob_url_store(); ErrorOr generate_new_blob_url(); ErrorOr add_entry_to_blob_url_store(JS::NonnullGCPtr object); ErrorOr remove_entry_from_blob_url_store(StringView url); void run_unloading_cleanup_steps(JS::NonnullGCPtr); }