LibWeb: Allow using queuing strategies on globals other than Window

These interfaces are exposed on *, meaning it should work for workers
and our newly added shadow realm global object by being stored on the
universal global scope mixin.
This commit is contained in:
Shannon Booth 2024-11-18 22:49:00 +13:00 committed by Andrew Kaster
commit d527c5df5d
Notes: github-actions[bot] 2024-11-21 01:10:37 +00:00
10 changed files with 89 additions and 61 deletions

View file

@ -28,6 +28,19 @@ public:
WebIDL::ExceptionOr<String> atob(String const& data) const;
void queue_microtask(WebIDL::CallbackType&);
WebIDL::ExceptionOr<JS::Value> structured_clone(JS::Value, StructuredSerializeOptions const&) const;
GC::Ref<WebIDL::CallbackType> count_queuing_strategy_size_function();
GC::Ref<WebIDL::CallbackType> byte_length_queuing_strategy_size_function();
protected:
void visit_edges(GC::Cell::Visitor&);
private:
// https://streams.spec.whatwg.org/#count-queuing-strategy-size-function
GC::Ptr<WebIDL::CallbackType> m_count_queuing_strategy_size_function;
// https://streams.spec.whatwg.org/#byte-length-queuing-strategy-size-function
GC::Ptr<WebIDL::CallbackType> m_byte_length_queuing_strategy_size_function;
};
}