diff --git a/Userland/Libraries/LibWeb/DOM/DocumentLoading.cpp b/Userland/Libraries/LibWeb/DOM/DocumentLoading.cpp index 22dab53bf6e..d0523bc0362 100644 --- a/Userland/Libraries/LibWeb/DOM/DocumentLoading.cpp +++ b/Userland/Libraries/LibWeb/DOM/DocumentLoading.cpp @@ -93,7 +93,7 @@ static WebIDL::ExceptionOr> load_markdown_docume parser->run(url); }); - auto process_body_error = JS::create_heap_function(realm.heap(), [](JS::GCPtr) { + auto process_body_error = JS::create_heap_function(realm.heap(), [](JS::Value) { dbgln("FIXME: Load html page with an error if read of body failed."); }); @@ -168,7 +168,7 @@ static WebIDL::ExceptionOr> load_html_document(H }); }); - auto process_body_error = JS::create_heap_function(document->heap(), [](JS::GCPtr) { + auto process_body_error = JS::create_heap_function(document->heap(), [](JS::Value) { dbgln("FIXME: Load html page with an error if read of body failed."); }); @@ -259,7 +259,7 @@ static WebIDL::ExceptionOr> load_xml_document(HT } }); - auto process_body_error = JS::create_heap_function(document->heap(), [](JS::GCPtr) { + auto process_body_error = JS::create_heap_function(document->heap(), [](JS::Value) { dbgln("FIXME: Load html page with an error if read of body failed."); }); @@ -322,7 +322,7 @@ static WebIDL::ExceptionOr> load_text_document(H MUST(title_element->append_child(*title_text)); }); - auto process_body_error = JS::create_heap_function(document->heap(), [](JS::GCPtr) { + auto process_body_error = JS::create_heap_function(document->heap(), [](JS::Value) { dbgln("FIXME: Load html page with an error if read of body failed."); }); @@ -418,7 +418,7 @@ static WebIDL::ExceptionOr> load_media_document( navigation_params.response->body()->fully_read( realm, JS::create_heap_function(document->heap(), [document](ByteBuffer) { HTML::HTMLParser::the_end(document); }), - JS::create_heap_function(document->heap(), [](JS::GCPtr) {}), + JS::create_heap_function(document->heap(), [](JS::Value) {}), JS::NonnullGCPtr { realm.global_object() }); // 9. Return document. diff --git a/Userland/Libraries/LibWeb/Fetch/Body.cpp b/Userland/Libraries/LibWeb/Fetch/Body.cpp index 29d060c0212..faf8636ddb9 100644 --- a/Userland/Libraries/LibWeb/Fetch/Body.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Body.cpp @@ -182,7 +182,7 @@ WebIDL::ExceptionOr> consume_body(JS::Realm& realm // 3. Let errorSteps given error be to reject promise with error. // NOTE: `promise` and `realm` is protected by JS::SafeFunction. - auto error_steps = JS::create_heap_function(realm.heap(), [promise, &realm](JS::GCPtr error) { + auto error_steps = JS::create_heap_function(realm.heap(), [promise, &realm](JS::Value error) { // AD-HOC: An execution context is required for Promise's reject function. HTML::TemporaryExecutionContext execution_context { Bindings::host_defined_environment_settings_object(realm) }; WebIDL::reject_promise(realm, promise, error); diff --git a/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp b/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp index 8eaa0dfb236..08a5abf66d0 100644 --- a/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp @@ -502,7 +502,7 @@ WebIDL::ExceptionOr> main_fetch(JS::Realm& realm, Inf if (!request->integrity_metadata().is_empty()) { // 1. Let processBodyError be this step: run fetch response handover given fetchParams and a network // error. - auto process_body_error = JS::create_heap_function(vm.heap(), [&realm, &vm, &fetch_params](JS::GCPtr) { + auto process_body_error = JS::create_heap_function(vm.heap(), [&realm, &vm, &fetch_params](JS::Value) { fetch_response_handover(realm, fetch_params, Infrastructure::Response::network_error(vm, "Response body could not be processed"sv)); }); @@ -686,7 +686,7 @@ void fetch_response_handover(JS::Realm& realm, Infrastructure::FetchParams const // 2. Let processBodyError be this step: run fetchParams’s process response consume body given response and // failure. - auto process_body_error = JS::create_heap_function(vm.heap(), [&fetch_params, &response](JS::GCPtr) { + auto process_body_error = JS::create_heap_function(vm.heap(), [&fetch_params, &response](JS::Value) { (fetch_params.algorithms()->process_response_consume_body())(response, Infrastructure::FetchAlgorithms::ConsumeBodyFailureTag {}); }); diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.cpp b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.cpp index 27d7f2033d7..4bad71cc5df 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.cpp +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.cpp @@ -82,7 +82,7 @@ void Body::fully_read(JS::Realm& realm, Web::Fetch::Infrastructure::Body::Proces // 3. Let errorSteps optionally given an exception exception be to queue a fetch task to run processBodyError given exception, with taskDestination. auto error_steps = [&realm, process_body_error, task_destination_object](JS::GCPtr exception) { queue_fetch_task(*task_destination_object, JS::create_heap_function(realm.heap(), [process_body_error, exception]() { - process_body_error->function()(*exception); + process_body_error->function()(exception); })); }; diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.h b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.h index 2b95957e6b7..6f5868099a6 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.h +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.h @@ -30,7 +30,7 @@ public: // processBody must be an algorithm accepting a byte sequence. using ProcessBodyCallback = JS::NonnullGCPtr>; // processBodyError must be an algorithm optionally accepting an exception. - using ProcessBodyErrorCallback = JS::NonnullGCPtr)>>; + using ProcessBodyErrorCallback = JS::NonnullGCPtr>; [[nodiscard]] static JS::NonnullGCPtr create(JS::VM&, JS::NonnullGCPtr); [[nodiscard]] static JS::NonnullGCPtr create(JS::VM&, JS::NonnullGCPtr, SourceType, Optional); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp index 19e97e1a82b..9f569d25699 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp @@ -548,7 +548,7 @@ WebIDL::ExceptionOr HTMLLinkElement::load_fallback_favicon_if_needed(JS::N auto process_body = JS::create_heap_function(realm.heap(), [document, request](ByteBuffer body) { (void)decode_favicon(body, request->url(), document->navigable()); }); - auto process_body_error = JS::create_heap_function(realm.heap(), [](JS::GCPtr) { + auto process_body_error = JS::create_heap_function(realm.heap(), [](JS::Value) { }); // 3. Use response's unsafe response as an icon as if it had been declared using the icon keyword. diff --git a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp index 6e6b92c19c3..c758a96515e 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLMediaElement.cpp @@ -1011,7 +1011,7 @@ WebIDL::ExceptionOr HTMLMediaElement::fetch_resource(URL::URL const& url_r // 5. Otherwise, incrementally read response's body given updateMedia, processEndOfMedia, an empty algorithm, and global. VERIFY(response->body()); - auto empty_algorithm = JS::create_heap_function(heap(), [](JS::GCPtr) {}); + auto empty_algorithm = JS::create_heap_function(heap(), [](JS::Value) {}); // FIXME: We are "fully" reading the response here, rather than "incrementally". Memory concerns aside, this should be okay for now as we are // always setting byteRange to "entire resource". However, we should switch to incremental reads when that is implemented, and then diff --git a/Userland/Libraries/LibWeb/HTML/HTMLVideoElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLVideoElement.cpp index 922734d337f..bd1b463f5b2 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLVideoElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLVideoElement.cpp @@ -203,7 +203,7 @@ WebIDL::ExceptionOr HTMLVideoElement::determine_element_poster_frame(Optio }); VERIFY(response->body()); - auto empty_algorithm = JS::create_heap_function(heap(), [](JS::GCPtr) {}); + auto empty_algorithm = JS::create_heap_function(heap(), [](JS::Value) {}); response->body()->fully_read(realm, on_image_data_read, empty_algorithm, JS::NonnullGCPtr { global }); }; diff --git a/Userland/Libraries/LibWeb/HTML/SharedImageRequest.cpp b/Userland/Libraries/LibWeb/HTML/SharedImageRequest.cpp index 119a3845271..befdd0cca13 100644 --- a/Userland/Libraries/LibWeb/HTML/SharedImageRequest.cpp +++ b/Userland/Libraries/LibWeb/HTML/SharedImageRequest.cpp @@ -90,7 +90,7 @@ void SharedImageRequest::fetch_image(JS::Realm& realm, JS::NonnullGCPtrurl(), mime_type, move(data)); }); - auto process_body_error = JS::create_heap_function(heap(), [this](JS::GCPtr) { + auto process_body_error = JS::create_heap_function(heap(), [this](JS::Value) { handle_failed_fetch(); });