mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:02:45 +00:00 
			
		
		
		
	 e64a8751d1
			
		
	
	
		e64a8751d1
		
	
	
	
	
		
			
			The dollar sign is a special character in POSIX shells and in the Ninja build file format. If the file name contains a `$`, something goes wrong in the escaping/unescaping of this symbol, and CMake/GCC/Clang generate invalid dependency files where not all instances of `$` are escaped properly. Because of this, Ninja fails to rebuild `$262Object.cpp` if the headers included by it have changed. Stale `$262Object.cpp.o` files have been the cause of mysterious crashes multiple times which only go away after doing a clean build. Let's prevent these from happening again by removing the `$` from the filename.
		
			
				
	
	
		
			36 lines
		
	
	
	
		
			729 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
	
		
			729 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibJS/Contrib/Test262/262Object.h>
 | |
| #include <LibJS/Runtime/GlobalObject.h>
 | |
| 
 | |
| namespace JS::Test262 {
 | |
| 
 | |
| class GlobalObject final : public JS::GlobalObject {
 | |
|     JS_OBJECT(GlobalObject, JS::GlobalObject);
 | |
| 
 | |
| public:
 | |
|     virtual ThrowCompletionOr<void> initialize(Realm&) override;
 | |
|     virtual ~GlobalObject() override = default;
 | |
| 
 | |
|     $262Object* $262() const { return m_$262; }
 | |
| 
 | |
| private:
 | |
|     GlobalObject(JS::Realm& realm)
 | |
|         : JS::GlobalObject(realm)
 | |
|     {
 | |
|     }
 | |
| 
 | |
|     virtual void visit_edges(Visitor&) override;
 | |
| 
 | |
|     GCPtr<$262Object> m_$262;
 | |
| 
 | |
|     JS_DECLARE_NATIVE_FUNCTION(print);
 | |
| };
 | |
| 
 | |
| }
 |