mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 23:30:20 +00:00
LibWeb: Remove unecessary dependence on Window from Fetch, XHR, FileAPI
These classes only needed Window to get at its realm. Pass a realm directly to construct Fetch, XMLHttpRequest and FileAPI classes.
This commit is contained in:
parent
6a10352712
commit
4878a18ee7
Notes:
sideshowbarker
2024-07-17 06:28:06 +09:00
Author: https://github.com/ADKaster
Commit: 4878a18ee7
Pull-request: https://github.com/SerenityOS/serenity/pull/15349
Reviewed-by: https://github.com/linusg ✅
17 changed files with 144 additions and 169 deletions
|
@ -7,8 +7,8 @@
|
|||
#include <LibJS/Runtime/Array.h>
|
||||
#include <LibJS/Runtime/IteratorOperations.h>
|
||||
#include <LibWeb/Bindings/HeadersIteratorPrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Fetch/HeadersIterator.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
|
||||
|
@ -22,7 +22,7 @@ HeadersIterator::HeadersIterator(Headers const& headers, JS::Object::PropertyKin
|
|||
, m_headers(headers)
|
||||
, m_iteration_kind(iteration_kind)
|
||||
{
|
||||
set_prototype(&headers.global_object().ensure_web_prototype<Bindings::HeadersIteratorPrototype>("HeadersIterator"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HeadersIteratorPrototype>(headers.realm(), "HeadersIterator"));
|
||||
}
|
||||
|
||||
HeadersIterator::~HeadersIterator() = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue