mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 02:42:44 +00:00 
			
		
		
		
	 b75b7f0c0d
			
		
	
	
		b75b7f0c0d
		
	
	
	
	
		
			
			Callers that are already in a fallible context will now TRY to allocate cells. Callers in infallible contexts get a FIXME.
		
			
				
	
	
		
			34 lines
		
	
	
	
		
			960 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
	
		
			960 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibJS/Heap/Heap.h>
 | |
| #include <LibWeb/Bindings/Intrinsics.h>
 | |
| #include <LibWeb/HTML/WorkerGlobalScope.h>
 | |
| #include <LibWeb/HTML/WorkerNavigator.h>
 | |
| 
 | |
| namespace Web::HTML {
 | |
| 
 | |
| JS::NonnullGCPtr<WorkerNavigator> WorkerNavigator::create(WorkerGlobalScope& global_scope)
 | |
| {
 | |
|     return global_scope.heap().allocate<WorkerNavigator>(global_scope.realm(), global_scope).release_allocated_value_but_fixme_should_propagate_errors();
 | |
| }
 | |
| 
 | |
| WorkerNavigator::WorkerNavigator(WorkerGlobalScope& global_scope)
 | |
|     : PlatformObject(global_scope.realm())
 | |
| {
 | |
| }
 | |
| 
 | |
| WorkerNavigator::~WorkerNavigator() = default;
 | |
| 
 | |
| JS::ThrowCompletionOr<void> WorkerNavigator::initialize(JS::Realm& realm)
 | |
| {
 | |
|     MUST_OR_THROW_OOM(Base::initialize(realm));
 | |
|     set_prototype(&Bindings::ensure_web_prototype<Bindings::WorkerNavigatorPrototype>(realm, "WorkerNavigator"));
 | |
| 
 | |
|     return {};
 | |
| }
 | |
| 
 | |
| }
 |