mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-19 01:22:54 +00:00
AK: Port URL::m_fragment from DeprecatedString to String
This commit is contained in:
parent
5663a2d3b4
commit
9d60f23abc
Notes:
sideshowbarker
2024-07-17 03:00:02 +09:00
Author: https://github.com/shannonbooth
Commit: 9d60f23abc
Pull-request: https://github.com/SerenityOS/serenity/pull/20510
Reviewed-by: https://github.com/ADKaster ✅
21 changed files with 68 additions and 76 deletions
|
@ -1077,9 +1077,7 @@ WebIDL::ExceptionOr<Optional<JS::NonnullGCPtr<PendingResponse>>> http_redirect_f
|
|||
: static_cast<Infrastructure::FilteredResponse const&>(response).internal_response();
|
||||
|
||||
// 3. Let locationURL be actualResponse’s location URL given request’s current URL’s fragment.
|
||||
auto const& fragment = request->current_url().fragment();
|
||||
auto fragment_string = fragment.is_null() ? Optional<String> {} : TRY_OR_THROW_OOM(vm, String::from_deprecated_string(fragment));
|
||||
auto location_url_or_error = actual_response->location_url(fragment_string);
|
||||
auto location_url_or_error = actual_response->location_url(request->current_url().fragment());
|
||||
|
||||
// 4. If locationURL is null, then return response.
|
||||
if (!location_url_or_error.is_error() && !location_url_or_error.value().has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue