ladybird/Libraries/LibWeb/StorageAPI/NavigatorStorage.cpp
Shannon Booth f87041bf3a LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00

22 lines
707 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* Copyright (c) 2024, Jamie Mansfield <jmansfield@cadixdev.org>
* Copyright (c) 2024, Tim Flynn <trflynn89@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Runtime/Realm.h>
#include <LibWeb/HTML/Scripting/Environments.h>
#include <LibWeb/StorageAPI/NavigatorStorage.h>
#include <LibWeb/StorageAPI/StorageManager.h>
namespace Web::StorageAPI {
// https://storage.spec.whatwg.org/#dom-navigatorstorage-storage
GC::Ref<StorageManager> NavigatorStorage::storage()
{
// The storage getter steps are to return thiss relevant settings objects StorageManager object.
return HTML::relevant_settings_object(this_navigator_storage_object()).storage_manager();
}
}