mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:18:12 +00:00
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.
This commit is contained in:
parent
f7ff1fd985
commit
9acc542059
19 changed files with 62 additions and 49 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue