mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 02:02:45 +00:00 
			
		
		
		
	 02edd240ae
			
		
	
	
		02edd240ae
		
	
	
	
	
		
			
			Instead of spawning these processes from the WebContent process, we now create them in the Browser chrome. Part 1/N of "all processes are owned by the chrome".
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			737 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			737 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibCore/System.h>
 | |
| #include <LibWeb/Worker/WebWorkerClient.h>
 | |
| 
 | |
| namespace Web::HTML {
 | |
| 
 | |
| void WebWorkerClient::die()
 | |
| {
 | |
|     // FIXME: Notify WorkerAgent that the worker is ded
 | |
| }
 | |
| 
 | |
| WebWorkerClient::WebWorkerClient(NonnullOwnPtr<Core::LocalSocket> socket)
 | |
|     : IPC::ConnectionToServer<WebWorkerClientEndpoint, WebWorkerServerEndpoint>(*this, move(socket))
 | |
| {
 | |
| }
 | |
| 
 | |
| WebView::SocketPair WebWorkerClient::dup_sockets()
 | |
| {
 | |
|     WebView::SocketPair pair;
 | |
|     pair.socket = MUST(Core::System::dup(socket().fd().value()));
 | |
|     pair.fd_passing_socket = MUST(Core::System::dup(fd_passing_socket().fd().value()));
 | |
|     return pair;
 | |
| }
 | |
| 
 | |
| }
 |