diff options
author | Andrew Kaster <akaster@serenityos.org> | 2022-09-25 18:08:29 -0600 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-10-01 21:05:32 +0100 |
commit | 4878a18ee7ebe0c9d50880f804bd2dc22b1c751c (patch) | |
tree | a4a2980f80d1258edb09ee55f01c3c378fb9cb9c /Userland/Libraries/LibWeb/Fetch/HeadersIterator.cpp | |
parent | 6a103527122592501c9f86283a2abf70bd828d56 (diff) | |
download | serenity-4878a18ee7ebe0c9d50880f804bd2dc22b1c751c.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/Fetch/HeadersIterator.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Fetch/HeadersIterator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Fetch/HeadersIterator.cpp b/Userland/Libraries/LibWeb/Fetch/HeadersIterator.cpp index 6f118d6369..9410eae43e 100644 --- a/Userland/Libraries/LibWeb/Fetch/HeadersIterator.cpp +++ b/Userland/Libraries/LibWeb/Fetch/HeadersIterator.cpp @@ -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; |