LibWeb: Move name attribute to WorkerGlobalScope from subclasses

Also refactor the other properties of WorkerGlobalScope to match the
spec better.
This commit is contained in:
Andrew Kaster 2025-05-18 14:04:29 -06:00 committed by Andrew Kaster
commit b10a98b0cb
Notes: github-actions[bot] 2025-05-18 23:51:28 +00:00
4 changed files with 13 additions and 17 deletions

View file

@ -25,8 +25,6 @@ class SharedWorkerGlobalScope
public:
virtual ~SharedWorkerGlobalScope() override;
String const& name() const { return m_name; }
void close();
#define __ENUMERATE(attribute_name, event_name) \
@ -36,12 +34,10 @@ public:
#undef __ENUMERATE
private:
SharedWorkerGlobalScope(JS::Realm&, GC::Ref<Web::Page>, String name);
SharedWorkerGlobalScope(JS::Realm&, GC::Ref<Web::Page>);
virtual void initialize_web_interfaces_impl() override;
virtual void finalize() override;
String m_name;
};
HashTable<GC::RawRef<SharedWorkerGlobalScope>>& all_shared_worker_global_scopes();