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:
Luke Wilde 2023-02-28 17:45:49 +00:00 committed by Linus Groh
parent f7ff1fd985
commit 9acc542059
Notes: sideshowbarker 2024-07-17 12:02:22 +09:00
19 changed files with 62 additions and 49 deletions

View file

@ -55,10 +55,8 @@ JS::NonnullGCPtr<FetchTimingInfo> FetchController::extract_full_timing_info() co
}
// https://fetch.spec.whatwg.org/#fetch-controller-abort
void FetchController::abort(JS::VM& vm, Optional<JS::Value> error)
void FetchController::abort(JS::Realm& realm, Optional<JS::Value> error)
{
auto& realm = *vm.current_realm();
// 1. Set controllers state to "aborted".
m_state = State::Aborted;