diff options
author | Luke Wilde <lukew@serenityos.org> | 2023-02-28 17:45:49 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-03-07 11:51:12 +0000 |
commit | 9acc542059569283586c151f09d6a1a016809cfc (patch) | |
tree | 4238ccb2914b55ee1a8901c90dd9d0be3c84a15b /Userland/Libraries/LibWeb/XHR | |
parent | f7ff1fd9856636c756156a2ed0da90105714b73f (diff) | |
download | serenity-9acc542059569283586c151f09d6a1a016809cfc.zip |
LibWeb: Propagate Realm instead of VM more through Fetch
This makes Fetch rely less on using main_thread_vm().current_realm(),
which relies on the dummy execution context if no JavaScript is
currently running.
Diffstat (limited to 'Userland/Libraries/LibWeb/XHR')
-rw-r--r-- | Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp index 86c6e1de8f..9b18be22eb 100644 --- a/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp +++ b/Userland/Libraries/LibWeb/XHR/XMLHttpRequest.cpp @@ -182,7 +182,7 @@ WebIDL::ExceptionOr<JS::Value> XMLHttpRequest::response() return JS::js_null(); // 3. Let jsonObject be the result of running parse JSON from bytes on thisโs received bytes. If that threw an exception, then return null. - auto json_object_result = Infra::parse_json_bytes_to_javascript_value(vm, m_received_bytes); + auto json_object_result = Infra::parse_json_bytes_to_javascript_value(realm(), m_received_bytes); if (json_object_result.is_error()) return JS::js_null(); |