LibWeb: Add ServiceWorker discarded flag to ESO
Looking at the spec it doesn't seem like there's a chance for a service worker client to be an environment but not an environment settings object. In the case that that changes in the implementation, we can move it.
This commit is contained in:
parent
0ece40c466
commit
237bcbff36
Notes:
github-actions[bot]
2024-09-07 09:39:46 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/237bcbff360 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1293 Reviewed-by: https://github.com/awesomekling
1 changed files with 7 additions and 0 deletions
|
@ -124,6 +124,9 @@ public:
|
|||
|
||||
JS::NonnullGCPtr<StorageAPI::StorageManager> storage_manager();
|
||||
|
||||
[[nodiscard]] bool discarded() const { return m_discarded; }
|
||||
void set_discarded(bool b) { m_discarded = b; }
|
||||
|
||||
protected:
|
||||
explicit EnvironmentSettingsObject(NonnullOwnPtr<JS::ExecutionContext>);
|
||||
|
||||
|
@ -149,6 +152,10 @@ private:
|
|||
// https://storage.spec.whatwg.org/#api
|
||||
// Each environment settings object has an associated StorageManager object.
|
||||
JS::GCPtr<StorageAPI::StorageManager> m_storage_manager;
|
||||
|
||||
// https://w3c.github.io/ServiceWorker/#service-worker-client-discarded-flag
|
||||
// A service worker client has an associated discarded flag. It is initially unset.
|
||||
bool m_discarded { false };
|
||||
};
|
||||
|
||||
EnvironmentSettingsObject& incumbent_settings_object();
|
||||
|
|
Loading…
Add table
Reference in a new issue