mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +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
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-17 12:02:22 +09:00 
				
			
			Author: https://github.com/Lubrsi
Commit: 9acc542059
Pull-request: https://github.com/SerenityOS/serenity/pull/17669
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/linusg ✅
			
					 19 changed files with 62 additions and 49 deletions
				
			
		|  | @ -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 controller’s state to "aborted".
 | ||||
|     m_state = State::Aborted; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Luke Wilde
						Luke Wilde