1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00
serenity/Libraries/LibJS/Runtime
Andreas Kling 1d468ed6d3 AK: Stop allowing implicit downcast with RefPtr and NonnullRefPtr
We were allowing this dangerous kind of thing:

RefPtr<Base> base;
RefPtr<Derived> derived = base;

This patch changes the {Nonnull,}RefPtr constructors so this is no
longer possible.

To downcast one of these pointers, there is now static_ptr_cast<T>:

RefPtr<Derived> derived = static_ptr_cast<Derived>(base);

Fixing this exposed a ton of cowboy-downcasts in various places,
which we're now forced to fix. :^)
2020-04-05 11:19:00 +02:00
..
Array.cpp LibJS+LibWeb: Move native properties to separate getters/setters 2020-03-29 00:37:33 +01:00
Array.h LibJS+LibWeb: Move native properties to separate getters/setters 2020-03-29 00:37:33 +01:00
ArrayConstructor.cpp LibJS: Add basic Array constructor 2020-04-04 22:28:21 +02:00
ArrayConstructor.h LibJS: Add basic Array constructor 2020-04-04 22:28:21 +02:00
ArrayPrototype.cpp LibJS: Add basic Array constructor 2020-04-04 22:28:21 +02:00
ArrayPrototype.h LibJS+LibWeb: Move native JS functions into dedicated member functions 2020-03-28 23:10:37 +01:00
Cell.cpp LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
Cell.h LibJS: Make JS::Cell non-copyable and non-movable 2020-04-02 15:24:50 +02:00
ConsoleObject.cpp LibJS: Add argument(i) and argument_count() to Interpreter 2020-04-01 22:38:59 +02:00
ConsoleObject.h LibJS+LibWeb: Move native JS functions into dedicated member functions 2020-03-28 23:10:37 +01:00
Date.cpp LibJS: Start implementing Date :^) 2020-03-30 14:11:54 +02:00
Date.h js: Implement print function for Date objects 2020-03-31 21:19:21 +02:00
DateConstructor.cpp LibJS: Add js_string(Interpreter&, String) 2020-04-04 12:58:05 +02:00
DateConstructor.h LibJS: Implement constructor/non-constructor function calls 2020-04-01 20:18:36 +02:00
DatePrototype.cpp LibJS: Add js_string(Interpreter&, String) 2020-04-04 12:58:05 +02:00
DatePrototype.h LibJS: Implement Date.prototype.to{Date,Time}String() 2020-03-30 21:43:35 +02:00
Error.cpp LibJS: Implement basic exception throwing 2020-03-24 16:14:10 +01:00
Error.h LibJS: Implement basic exception throwing 2020-03-24 16:14:10 +01:00
ErrorConstructor.cpp LibJS: Implement Error function/constructor 2020-04-01 20:47:37 +02:00
ErrorConstructor.h LibJS: Implement Error function/constructor 2020-04-01 20:47:37 +02:00
ErrorPrototype.cpp LibJS: Add js_string(Interpreter&, String) 2020-04-04 12:58:05 +02:00
ErrorPrototype.h LibJS: Implement Error.prototype.toString() 2020-04-03 09:07:05 +02:00
Exception.cpp LibJS: Implement "throw" 2020-03-24 22:21:58 +01:00
Exception.h LibJS: Implement "throw" 2020-03-24 22:21:58 +01:00
Function.cpp LibJS: Add Function() and Function.prototype 2020-04-04 15:58:49 +02:00
Function.h LibJS: Implement constructor/non-constructor function calls 2020-04-01 20:18:36 +02:00
FunctionConstructor.cpp LibJS: Add Function() and Function.prototype 2020-04-04 15:58:49 +02:00
FunctionConstructor.h LibJS: Add Function() and Function.prototype 2020-04-04 15:58:49 +02:00
FunctionPrototype.cpp LibJS: Add Function() and Function.prototype 2020-04-04 15:58:49 +02:00
FunctionPrototype.h LibJS: Add Function() and Function.prototype 2020-04-04 15:58:49 +02:00
GlobalObject.cpp LibJS: Add basic Array constructor 2020-04-04 22:28:21 +02:00
GlobalObject.h LibWeb+LibJS: Move DOM Window object to dedicated classes 2020-04-01 18:57:00 +02:00
MathObject.cpp LibJS: Add support for Math.ceil() and Math.trunc() 2020-04-05 10:56:23 +02:00
MathObject.h LibJS: Add support for Math.ceil() and Math.trunc() 2020-04-05 10:56:23 +02:00
NativeFunction.cpp LibJS: Implement constructor/non-constructor function calls 2020-04-01 20:18:36 +02:00
NativeFunction.h LibJS: Implement constructor/non-constructor function calls 2020-04-01 20:18:36 +02:00
NativeProperty.cpp LibJS+LibWeb: Move native properties to separate getters/setters 2020-03-29 00:37:33 +01:00
NativeProperty.h LibJS+LibWeb: Move native properties to separate getters/setters 2020-03-29 00:37:33 +01:00
NumberObject.cpp LibJS: Add NumberObject and make to_object() on number values create it 2020-04-04 23:13:13 +02:00
NumberObject.h LibJS: Add NumberObject and make to_object() on number values create it 2020-04-04 23:13:13 +02:00
NumberPrototype.cpp LibJS: Add NumberObject and make to_object() on number values create it 2020-04-04 23:13:13 +02:00
NumberPrototype.h LibJS: Add NumberObject and make to_object() on number values create it 2020-04-04 23:13:13 +02:00
Object.cpp LibJS: Set length property in Object::put_native_function() 2020-04-04 15:58:49 +02:00
Object.h LibJS: Set length property in Object::put_native_function() 2020-04-04 15:58:49 +02:00
ObjectConstructor.cpp LibJS: Set length property in Object::put_native_function() 2020-04-04 15:58:49 +02:00
ObjectConstructor.h LibJS: Implement constructor/non-constructor function calls 2020-04-01 20:18:36 +02:00
ObjectPrototype.cpp LibJS: Set length property in Object::put_native_function() 2020-04-04 15:58:49 +02:00
ObjectPrototype.h LibJS+LibWeb: Move native JS functions into dedicated member functions 2020-03-28 23:10:37 +01:00
PrimitiveString.cpp LibJS: Add js_string(Interpreter&, String) 2020-04-04 12:58:05 +02:00
PrimitiveString.h LibJS: Add js_string(Interpreter&, String) 2020-04-04 12:58:05 +02:00
ScriptFunction.cpp AK: Stop allowing implicit downcast with RefPtr and NonnullRefPtr 2020-04-05 11:19:00 +02:00
ScriptFunction.h AK: Stop allowing implicit downcast with RefPtr and NonnullRefPtr 2020-04-05 11:19:00 +02:00
Shape.cpp LibJS: Start implementing object shapes 2020-04-02 19:32:21 +02:00
Shape.h LibJS: Start implementing object shapes 2020-04-02 19:32:21 +02:00
StringObject.cpp LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
StringObject.h LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
StringPrototype.cpp LibJS: Add String.prototype.indexOf() 2020-04-04 23:44:29 +02:00
StringPrototype.h LibJS: Add String.prototype.indexOf() 2020-04-04 23:44:29 +02:00
Value.cpp LibJS: Add support for floating point modulous 2020-04-05 10:38:13 +02:00
Value.h LibJS: Add basic support for modulo (%) in binary expressions 2020-04-04 21:17:34 +02:00