From a744a9ebe7c3ff8134d9e529b4d0436ae5ed5f02 Mon Sep 17 00:00:00 2001 From: Kenneth Myhra Date: Mon, 22 Jul 2024 20:46:39 +0200 Subject: [PATCH] LibWeb: Append fetch record to client's fetch group when request is a ...subresource. --- Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp b/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp index 05ee479df02..a5c39823126 100644 --- a/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp @@ -249,8 +249,11 @@ WebIDL::ExceptionOr> fetch(JS: // 16. If request is a subresource request, then: if (request.is_subresource_request()) { - // FIXME: 1. Let record be a new fetch record whose request is request and controller is fetchParams’s controller. - // FIXME: 2. Append record to request’s client’s fetch group list of fetch records. + // 1. Let record be a new fetch record whose request is request and controller is fetchParams’s controller. + auto record = Infrastructure::FetchRecord::create(vm, request, fetch_params->controller()); + + // 2. Append record to request’s client’s fetch group list of fetch records. + request.client()->fetch_group().append(record); } // 17. Run main fetch given fetchParams.