mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Implement NavigatorStorage mixin interface
Co-authored-by: Tim Flynn <trflynn89@serenityos.org>
This commit is contained in:
parent
1b84062c74
commit
e3b3041a0c
Notes:
github-actions[bot]
2024-08-16 15:23:10 +00:00
Author: https://github.com/jamierocks
Commit: e3b3041a0c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1066
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/trflynn89 ✅
12 changed files with 93 additions and 3 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <LibWeb/HTML/WorkerGlobalScope.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/SecureContexts/AbstractOperations.h>
|
||||
#include <LibWeb/StorageAPI/StorageManager.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -56,6 +57,7 @@ void EnvironmentSettingsObject::visit_edges(Cell::Visitor& visitor)
|
|||
visitor.ignore(m_outstanding_rejected_promises_weak_set);
|
||||
m_realm_execution_context->visit_edges(visitor);
|
||||
visitor.visit(m_fetch_group);
|
||||
visitor.visit(m_storage_manager);
|
||||
}
|
||||
|
||||
JS::ExecutionContext& EnvironmentSettingsObject::realm_execution_context()
|
||||
|
@ -517,4 +519,11 @@ SerializedEnvironmentSettingsObject EnvironmentSettingsObject::serialize()
|
|||
return object;
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<StorageAPI::StorageManager> EnvironmentSettingsObject::storage_manager()
|
||||
{
|
||||
if (!m_storage_manager)
|
||||
m_storage_manager = realm().heap().allocate<StorageAPI::StorageManager>(realm(), realm());
|
||||
return *m_storage_manager;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue