mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 02:42:44 +00:00 
			
		
		
		
	LibJS+LibWeb: Stop generating is_foo_wrapper() for JS DOM wrappers
This commit is contained in:
		
							parent
							
								
									f48751a739
								
							
						
					
					
						commit
						d2613403e0
					
				
					 3 changed files with 2 additions and 4 deletions
				
			
		|  | @ -112,7 +112,6 @@ public: | |||
|     virtual bool is_array() const { return false; } | ||||
|     virtual bool is_function() const { return false; } | ||||
|     virtual bool is_typed_array() const { return false; } | ||||
|     virtual bool is_node_wrapper() const { return false; } | ||||
| 
 | ||||
|     virtual const char* class_name() const override { return "Object"; } | ||||
|     virtual void visit_edges(Cell::Visitor&) override; | ||||
|  |  | |||
|  | @ -80,7 +80,7 @@ JS_DEFINE_NATIVE_FUNCTION(RangePrototype::set_start) | |||
|     if (vm.exception()) | ||||
|         return {}; | ||||
| 
 | ||||
|     if (!arg0->is_node_wrapper()) { | ||||
|     if (!is<NodeWrapper>(arg0)) { | ||||
|         vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "Node"); | ||||
|         return {}; | ||||
|     } | ||||
|  | @ -103,7 +103,7 @@ JS_DEFINE_NATIVE_FUNCTION(RangePrototype::set_end) | |||
|     if (vm.exception()) | ||||
|         return {}; | ||||
| 
 | ||||
|     if (!arg0->is_node_wrapper()) { | ||||
|     if (!is<NodeWrapper>(arg0)) { | ||||
|         vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "Node"); | ||||
|         return {}; | ||||
|     } | ||||
|  |  | |||
|  | @ -480,7 +480,6 @@ public: | |||
| 
 | ||||
|     generator.append(R"~~~( | ||||
| private: | ||||
|     virtual bool is_@wrapper_class:snakecase@() const final { return true; } | ||||
| )~~~"); | ||||
| 
 | ||||
|     for (auto& function : interface.functions) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling