ソースを参照

LibWeb: Append fetch record to client's fetch group when request is a

...subresource.
Kenneth Myhra 1 年間 前
コミット
a744a9ebe7
1 ファイル変更5 行追加2 行削除
  1. 5 2
      Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp

+ 5 - 2
Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp

@@ -249,8 +249,11 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Infrastructure::FetchController>> 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.