mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 13:12:46 +00:00 
			
		
		
		
	LibJS+LibWeb: Let Realm store a plain Object for [[GlobalObject]]
This removes the requirement of having a global object that actually inherits from JS::GlobalObject, which is now a perfectly valid scenario. With the upcoming removal of wrapper objects in LibWeb, the HTML::Window object will inherit from DOM::EventTarget, which means it cannot also inherit from JS::GlobalObject.
This commit is contained in:
		
							parent
							
								
									72730422bb
								
							
						
					
					
						commit
						52543fc771
					
				
					 8 changed files with 20 additions and 20 deletions
				
			
		|  | @ -240,7 +240,7 @@ void old_queue_global_task_with_document(HTML::Task::Source source, DOM::Documen | |||
| } | ||||
| 
 | ||||
| // https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task
 | ||||
| void queue_global_task(HTML::Task::Source source, JS::GlobalObject& global_object, Function<void()> steps) | ||||
| void queue_global_task(HTML::Task::Source source, JS::Object& global_object, Function<void()> steps) | ||||
| { | ||||
|     // 1. Let event loop be global's relevant agent's event loop.
 | ||||
|     auto& global_custom_data = verify_cast<Bindings::WebEngineCustomData>(*global_object.vm().custom_data()); | ||||
|  |  | |||
|  | @ -100,7 +100,7 @@ private: | |||
| 
 | ||||
| EventLoop& main_thread_event_loop(); | ||||
| void old_queue_global_task_with_document(HTML::Task::Source, DOM::Document&, Function<void()> steps); | ||||
| void queue_global_task(HTML::Task::Source, JS::GlobalObject&, Function<void()> steps); | ||||
| void queue_global_task(HTML::Task::Source, JS::Object&, Function<void()> steps); | ||||
| void queue_a_microtask(DOM::Document*, Function<void()> steps); | ||||
| void perform_a_microtask_checkpoint(); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Linus Groh
						Linus Groh