mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
LibWeb/Fetch: Port infrastructure to new String
This commit is contained in:
parent
7f9ddcf420
commit
11023a3c53
20 changed files with 144 additions and 142 deletions
|
@ -160,11 +160,11 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Response>> Response::construct_impl(JS::Rea
|
|||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#dom-response-error
|
||||
JS::NonnullGCPtr<Response> Response::error(JS::VM& vm)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<Response>> Response::error(JS::VM& vm)
|
||||
{
|
||||
// The static error() method steps are to return the result of creating a Response object, given a new network error, "immutable", and this’s relevant Realm.
|
||||
// FIXME: How can we reliably get 'this', i.e. the object the function was called on, in IDL-defined functions?
|
||||
return Response::create(*vm.current_realm(), Infrastructure::Response::network_error(vm, "Response created via `Response.error()`"sv), Headers::Guard::Immutable).release_value_but_fixme_should_propagate_errors();
|
||||
return Response::create(*vm.current_realm(), Infrastructure::Response::network_error(vm, TRY_OR_THROW_OOM(vm, "Response created via `Response.error()`"_string)), Headers::Guard::Immutable);
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#dom-response-redirect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue