mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb/HTML: Add environment discarding steps
Exactly one place seems to define these at the moment: service worker clients. Since we don't have a type for these and just use EnvironmentSettingsObject, I've put it there.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
a15a55e858
commit
5a4f15d8f5
Notes:
github-actions[bot]
2025-03-14 17:06:43 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/5a4f15d8f58 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3914 Reviewed-by: https://github.com/gmta ✅
@@ -46,6 +46,9 @@ public:
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-execution-ready-flag
|
||||
bool execution_ready { false };
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#environment-discarding-steps
|
||||
virtual void discard_environment() { }
|
||||
|
||||
protected:
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
};
|
||||
@@ -115,6 +118,8 @@ public:
|
||||
[[nodiscard]] bool discarded() const { return m_discarded; }
|
||||
void set_discarded(bool b) { m_discarded = b; }
|
||||
|
||||
virtual void discard_environment() override;
|
||||
|
||||
protected:
|
||||
explicit EnvironmentSettingsObject(NonnullOwnPtr<JS::ExecutionContext>);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user