mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibWeb/Storage: Add a storage key getter that takes a URL::Origin
When we serialize blob URL entries we do not serialize the entire environment settings object and only use it's origin. To allow a Blob URL entry to access its relevant storage key, add a getter that simply takes an origin.
This commit is contained in:
committed by
Tim Ledbetter
parent
ca3d9d9ee0
commit
70df8122b1
@@ -26,6 +26,12 @@ Optional<StorageKey> obtain_a_storage_key(HTML::Environment const& environment)
|
||||
return key;
|
||||
}
|
||||
|
||||
StorageKey obtain_a_storage_key_for_non_storage_purposes(URL::Origin const& origin)
|
||||
{
|
||||
// NOTE: This function exists as there are cases where we don't have the full environment object, but we still need to obtain a storage key.
|
||||
return { origin };
|
||||
}
|
||||
|
||||
// https://storage.spec.whatwg.org/#obtain-a-storage-key-for-non-storage-purposes
|
||||
StorageKey obtain_a_storage_key_for_non_storage_purposes(HTML::Environment const& environment)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user