mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-03 23:00:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			482 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			482 B
		
	
	
	
		
			C++
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (c) 2025, Shannon Booth <shannon@serenityos.org>
 | 
						|
 *
 | 
						|
 * SPDX-License-Identifier: BSD-2-Clause
 | 
						|
 */
 | 
						|
 | 
						|
#include <LibWeb/HTML/EventLoop/EventLoop.h>
 | 
						|
#include <LibWeb/HTML/Scripting/WorkerAgent.h>
 | 
						|
 | 
						|
namespace Web::HTML {
 | 
						|
 | 
						|
NonnullOwnPtr<WorkerAgent> WorkerAgent::create(GC::Heap& heap, CanBlock can_block)
 | 
						|
{
 | 
						|
    auto agent = adopt_own(*new WorkerAgent(can_block));
 | 
						|
    agent->event_loop = heap.allocate<HTML::EventLoop>(HTML::EventLoop::Type::Worker);
 | 
						|
    return agent;
 | 
						|
}
 | 
						|
 | 
						|
}
 |