mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Delete unused BufferPolicy from fetch Request
This is no longer needed since all requests are unbuffered.
This commit is contained in:
parent
16b0f1e6c2
commit
0eb28a1a54
Notes:
github-actions[bot]
2025-11-20 11:30:41 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 0eb28a1a54
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6839
Reviewed-by: https://github.com/trflynn89 ✅
3 changed files with 0 additions and 17 deletions
|
|
@ -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 request’s body is non-null, set newRequest’s body to the result of cloning request’s body.
|
||||
if (auto const* body = m_body.get_pointer<GC::Ref<Body>>())
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue