mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 13:32:45 +00:00 
			
		
		
		
	 124c378472
			
		
	
	
		124c378472
		
	
	
	
	
		
			
			We now create a WorkerAgent for the parent context, which is currently only a Window. Note that Workers can have Workers per the spec. The WorkerAgent spawns a WebWorker process to hold the actual script execution of the Worker. This is modeled with the DedicatedWorkerHost object in the WebWorker process. A start_dedicated_worker IPC method in the WebWorker IPC creates the WorkerHost object. Future different worker types may use different IPC messages to create their WorkerHost instance. This implementation cannot yet postMessage between the parent and the child processes. Co-Authored-By: Andreas Kling <kling@serenityos.org>
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			452 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			452 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #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))
 | |
| {
 | |
| }
 | |
| 
 | |
| }
 |