mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:12:44 +00:00 
			
		
		
		
	LibJS: Move builtin prototypes to the global object
This moves us towards being able to run JavaScript in different global objects without allocating a separate GC heap.
This commit is contained in:
		
							parent
							
								
									cbcf317e76
								
							
						
					
					
						commit
						fca08bd000
					
				
					 40 changed files with 131 additions and 101 deletions
				
			
		|  | @ -28,6 +28,7 @@ | |||
| #include <AK/Function.h> | ||||
| #include <LibJS/Interpreter.h> | ||||
| #include <LibJS/Runtime/Function.h> | ||||
| #include <LibJS/Runtime/GlobalObject.h> | ||||
| #include <LibWeb/Bindings/EventListenerWrapper.h> | ||||
| #include <LibWeb/Bindings/EventTargetWrapper.h> | ||||
| #include <LibWeb/DOM/EventListener.h> | ||||
|  | @ -37,7 +38,7 @@ namespace Web { | |||
| namespace Bindings { | ||||
| 
 | ||||
| EventTargetWrapper::EventTargetWrapper(EventTarget& impl) | ||||
|     : Wrapper(*interpreter().object_prototype()) | ||||
|     : Wrapper(*interpreter().global_object().object_prototype()) | ||||
|     , m_impl(impl) | ||||
| { | ||||
|     put_native_function("addEventListener", add_event_listener, 2); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling