LibWeb: Delete unused BufferPolicy from fetch Request

This is no longer needed since all requests are unbuffered.
This commit is contained in:
Aliaksandr Kalenik 2025-11-17 03:47:06 +01:00 committed by Tim Flynn
parent 16b0f1e6c2
commit 0eb28a1a54
Notes: github-actions[bot] 2025-11-20 11:30:41 +00:00
3 changed files with 0 additions and 17 deletions

View file

@ -264,7 +264,6 @@ GC::Ref<Request> Request::clone(JS::Realm& realm) const
new_request->set_prevent_no_cache_cache_control_header_modification(m_prevent_no_cache_cache_control_header_modification);
new_request->set_done(m_done);
new_request->set_timing_allow_failed(m_timing_allow_failed);
new_request->set_buffer_policy(m_buffer_policy);
// 2. If requests body is non-null, set newRequests body to the result of cloning requests body.
if (auto const* body = m_body.get_pointer<GC::Ref<Body>>())

View file

@ -159,13 +159,6 @@ public:
Auto
};
// AD-HOC: Some web features need to receive data as it arrives, rather than when the response is fully complete
// or when enough data has been buffered. Use this buffer policy to inform fetch of that requirement.
enum class BufferPolicy {
BufferResponse,
DoNotBufferResponse,
};
// Members are implementation-defined
struct InternalPriority { };
@ -335,9 +328,6 @@ public:
m_pending_responses.remove_first_matching([&](auto gc_ptr) { return gc_ptr == pending_response; });
}
[[nodiscard]] BufferPolicy buffer_policy() const { return m_buffer_policy; }
void set_buffer_policy(BufferPolicy buffer_policy) { m_buffer_policy = buffer_policy; }
private:
explicit Request(GC::Ref<HeaderList>);
@ -532,8 +522,6 @@ private:
// Non-standard
Vector<GC::Ref<Fetching::PendingResponse>> m_pending_responses;
BufferPolicy m_buffer_policy { BufferPolicy::BufferResponse };
};
WEB_API StringView request_destination_to_string(Request::Destination);

View file

@ -78,10 +78,6 @@ WebIDL::ExceptionOr<GC::Ref<EventSource>> EventSource::construct_impl(JS::Realm&
// 12. Set request's initiator type to "other".
request->set_initiator_type(Fetch::Infrastructure::Request::InitiatorType::Other);
// AD-HOC: We must not buffer the response as the connection generally never ends, thus we can't wait for the end
// of the response body.
request->set_buffer_policy(Fetch::Infrastructure::Request::BufferPolicy::DoNotBufferResponse);
// 13. Set ev's request to request.
event_source->m_request = request;