mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:02:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
	
		
			1,010 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
	
		
			1,010 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Weakable.h>
 | |
| #include <LibDebug/DebugInfo.h>
 | |
| #include <LibJS/Runtime/Completion.h>
 | |
| #include <LibJS/Runtime/GlobalObject.h>
 | |
| 
 | |
| namespace HackStudio {
 | |
| 
 | |
| class DebuggerGlobalJSObject final
 | |
|     : public JS::GlobalObject
 | |
|     , public Weakable<DebuggerGlobalJSObject> {
 | |
|     JS_OBJECT(DebuggerGlobalJSObject, JS::GlobalObject);
 | |
| 
 | |
| public:
 | |
|     DebuggerGlobalJSObject();
 | |
| 
 | |
|     virtual JS::ThrowCompletionOr<JS::Value> internal_get(JS::PropertyKey const&, JS::Value receiver) const override;
 | |
|     virtual JS::ThrowCompletionOr<bool> internal_set(JS::PropertyKey const&, JS::Value value, JS::Value receiver) override;
 | |
| 
 | |
|     Optional<JS::Value> debugger_to_js(Debug::DebugInfo::VariableInfo const&) const;
 | |
|     Optional<u32> js_to_debugger(JS::Value value, Debug::DebugInfo::VariableInfo const&) const;
 | |
| 
 | |
| private:
 | |
|     NonnullOwnPtrVector<Debug::DebugInfo::VariableInfo> m_variables;
 | |
| };
 | |
| 
 | |
| }
 | 
