mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb/HTML: Store the type of the storage object
This will be needed by the storage broadcast implementation to perform different steps if the object is for session storage.
This commit is contained in:
parent
f3ecd23a21
commit
bbf4739c8e
Notes:
github-actions[bot]
2025-01-02 10:39:40 +00:00
Author: https://github.com/shannonbooth
Commit: bbf4739c8e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3070
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/konradekk
3 changed files with 18 additions and 7 deletions
|
@ -15,13 +15,14 @@ namespace Web::HTML {
|
|||
|
||||
GC_DEFINE_ALLOCATOR(Storage);
|
||||
|
||||
GC::Ref<Storage> Storage::create(JS::Realm& realm, u64 quota_bytes)
|
||||
GC::Ref<Storage> Storage::create(JS::Realm& realm, Type type, u64 quota_bytes)
|
||||
{
|
||||
return realm.create<Storage>(realm, quota_bytes);
|
||||
return realm.create<Storage>(realm, type, quota_bytes);
|
||||
}
|
||||
|
||||
Storage::Storage(JS::Realm& realm, u64 quota_bytes)
|
||||
Storage::Storage(JS::Realm& realm, Type type, u64 quota_bytes)
|
||||
: Bindings::PlatformObject(realm)
|
||||
, m_type(type)
|
||||
, m_quota_bytes(quota_bytes)
|
||||
{
|
||||
m_legacy_platform_object_flags = LegacyPlatformObjectFlags {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue