mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-01 05:41:01 +00:00 
			
		
		
		
	 8a3c66d8a6
			
		
	
	
		8a3c66d8a6
		
	
	
	
	
		
			
			These are not associated with a javascript realm, so to avoid confusion about which realm these need to be created in, make all of these objects a GC::Cell, and deal with the fallout.
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			573 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			573 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2025, Luke Wilde <luke@ladybird.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibJS/Runtime/Realm.h>
 | |
| #include <LibWeb/ContentSecurityPolicy/Directives/Directive.h>
 | |
| #include <LibWeb/ContentSecurityPolicy/Directives/DirectiveFactory.h>
 | |
| 
 | |
| namespace Web::ContentSecurityPolicy::Directives {
 | |
| 
 | |
| GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String> value)
 | |
| {
 | |
|     dbgln("Potential FIXME: Creating unknown Content Security Policy directive: {}", name);
 | |
|     return heap.allocate<Directive>(move(name), move(value));
 | |
| }
 | |
| 
 | |
| }
 |