mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:12:44 +00:00 
			
		
		
		
	 ece961f882
			
		
	
	
		ece961f882
		
	
	
	
	
		
			
			(Instead of MarkedVector<Value>.) This is a step towards not storing argument lists in MarkedVector<Value> at all. Note that they still end up in MarkedVectors since that's what ExecutionContext has.
		
			
				
	
	
		
			28 lines
		
	
	
	
		
			677 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			677 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/OwnPtr.h>
 | |
| #include <LibJS/Heap/Handle.h>
 | |
| #include <LibJS/Runtime/Completion.h>
 | |
| 
 | |
| namespace JS {
 | |
| 
 | |
| // 9.5.1 JobCallback Records, https://tc39.es/ecma262/#sec-jobcallback-records
 | |
| struct JobCallback {
 | |
|     struct CustomData {
 | |
|         virtual ~CustomData() = default;
 | |
|     };
 | |
| 
 | |
|     Handle<FunctionObject> callback;
 | |
|     OwnPtr<CustomData> custom_data { nullptr };
 | |
| };
 | |
| 
 | |
| JobCallback make_job_callback(FunctionObject& callback);
 | |
| ThrowCompletionOr<Value> call_job_callback(VM&, JobCallback&, Value this_value, ReadonlySpan<Value> arguments_list);
 | |
| 
 | |
| }
 |