mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Define stream variable before using it
This is an editoral change from the fetch spec. Since we already defined the stream before it being used this only re-numbers the spec steps. It also corrects a minor typo ('followings' to 'following') which was corrected in the same editoral spec change.
This commit is contained in:
parent
a1037e28d6
commit
681e4e5d01
Notes:
github-actions[bot]
2025-08-08 10:14:19 +00:00
Author: https://github.com/kennethmyhra
Commit: 681e4e5d01
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5771
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 3 additions and 3 deletions
|
@ -2325,11 +2325,11 @@ WebIDL::ExceptionOr<GC::Ref<PendingResponse>> nonstandard_resource_loader_file_o
|
|||
if (request->buffer_policy() == Infrastructure::Request::BufferPolicy::DoNotBufferResponse) {
|
||||
HTML::TemporaryExecutionContext execution_context { realm, HTML::TemporaryExecutionContext::CallbacksEnabled::Yes };
|
||||
|
||||
// 12. Let stream be a new ReadableStream.
|
||||
// 10. Let stream be a new ReadableStream.
|
||||
auto stream = realm.create<Streams::ReadableStream>(realm);
|
||||
auto fetched_data_receiver = realm.create<FetchedDataReceiver>(fetch_params, stream);
|
||||
|
||||
// 10. Let pullAlgorithm be the followings steps:
|
||||
// 11. Let pullAlgorithm be the following steps:
|
||||
auto pull_algorithm = GC::create_function(realm.heap(), [&realm, fetched_data_receiver]() {
|
||||
// 1. Let promise be a new promise.
|
||||
auto promise = WebIDL::create_promise(realm);
|
||||
|
@ -2342,7 +2342,7 @@ WebIDL::ExceptionOr<GC::Ref<PendingResponse>> nonstandard_resource_loader_file_o
|
|||
return promise;
|
||||
});
|
||||
|
||||
// 11. Let cancelAlgorithm be an algorithm that aborts fetchParams’s controller with reason, given reason.
|
||||
// 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s controller with reason, given reason.
|
||||
auto cancel_algorithm = GC::create_function(realm.heap(), [&realm, &fetch_params](JS::Value reason) {
|
||||
fetch_params.controller()->abort(realm, reason);
|
||||
return WebIDL::create_resolved_promise(realm, JS::js_undefined());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue