mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
LibWeb: Make Fetch::Request follow abort signals where appropriate
This commit is contained in:
parent
dce6327ae7
commit
5cc190ad70
Notes:
sideshowbarker
2024-07-17 05:05:13 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/5cc190ad70 Pull-request: https://github.com/SerenityOS/serenity/pull/15815
@ -385,9 +385,8 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Request>> Request::construct_impl(JS::Realm
|
||||
request_object->m_signal = realm.heap().allocate<DOM::AbortSignal>(this_relevant_realm, this_relevant_realm);
|
||||
|
||||
// 29. If signal is not null, then make this’s signal follow signal.
|
||||
if (input_signal != nullptr) {
|
||||
// FIXME: Our AbortSignal doesn't support 'following' yet.
|
||||
}
|
||||
if (input_signal != nullptr)
|
||||
request_object->m_signal->follow(*input_signal);
|
||||
|
||||
// 30. Set this’s headers to a new Headers object with this’s relevant Realm, whose header list is request’s header list and guard is "request".
|
||||
request_object->m_headers = realm.heap().allocate<Headers>(realm, realm);
|
||||
@ -635,7 +634,8 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Request>> Request::clone() const
|
||||
// 3. Let clonedRequestObject be the result of creating a Request object, given clonedRequest, this’s headers’s guard, and this’s relevant Realm.
|
||||
auto cloned_request_object = Request::create(move(cloned_request), m_headers->guard(), HTML::relevant_realm(*this));
|
||||
|
||||
// FIXME: 4. Make clonedRequestObject’s signal follow this’s signal.
|
||||
// 4. Make clonedRequestObject’s signal follow this’s signal.
|
||||
cloned_request_object->m_signal->follow(*m_signal);
|
||||
|
||||
// 5. Return clonedRequestObject.
|
||||
return cloned_request_object;
|
||||
|
Loading…
Reference in New Issue
Block a user