From 0d82cc8a67da99d8e168c7ef789c718b29bf43d4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 21 May 2023 15:08:57 +0200 Subject: [PATCH] LibWeb: Don't assume response object isn't null in fetch abort algorithm The callee that we're passing it to expects a GCPtr anyway, so there's no need to explicitly dereference this. Fixes a crash when loading https://spotify.com/ --- Userland/Libraries/LibWeb/Fetch/FetchMethod.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Fetch/FetchMethod.cpp b/Userland/Libraries/LibWeb/Fetch/FetchMethod.cpp index cbad7543b62..db54bf73ed2 100644 --- a/Userland/Libraries/LibWeb/Fetch/FetchMethod.cpp +++ b/Userland/Libraries/LibWeb/Fetch/FetchMethod.cpp @@ -143,7 +143,7 @@ JS::NonnullGCPtr fetch(JS::VM& vm, RequestInfo const& input, Reques auto& promise_capability = *promise_capability_handle; auto& request_object = *request_object_handle; - auto& response_object = *response_object_handle; + JS::GCPtr response_object = response_object_handle.ptr(); // 1. Set locallyAborted to true. locally_aborted->set_value(true);