1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 03:34:59 +00:00
serenity/Libraries/LibJS/Runtime
Brian Gianforcaro 2a65db7c12
LibJS: Implement Error.prototype.name setter (#1776)
The MDN example for creating a custom error type in javascript uses:

    function CustomError(foo, message, fileName, lineNumber) {
        var instance = new Error(message, fileName, lineNumber);
        instance.name = 'CustomError';
        instance.foo = foo;
        Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
        return instance;
    }

The name property on the Error prototype needs to be settable for
this to work properly.
2020-04-13 11:19:53 +02:00
..
Array.cpp LibJS: Throw real TypeError, ReferenceError, etc objects 2020-04-10 13:09:35 +02:00
Array.h LibJS: Add a number-indexed property storage to all Objects 2020-04-06 18:09:26 +02:00
ArrayConstructor.cpp LibJS: Tweak FunctionPrototype::to_string and constructors 2020-04-13 01:14:21 +02:00
ArrayConstructor.h LibJS: Add basic Array constructor 2020-04-04 22:28:21 +02:00
ArrayPrototype.cpp LibJS: Throw real TypeError, ReferenceError, etc objects 2020-04-10 13:09:35 +02:00
ArrayPrototype.h LibJS: Add Array.prototype.toString() 2020-04-05 18:07:41 +02:00
BooleanConstructor.cpp LibJS: Tweak FunctionPrototype::to_string and constructors 2020-04-13 01:14:21 +02:00
BooleanConstructor.h LibJS: Reformat BooleanConstructor.{cpp,h} 2020-04-07 17:25:50 +02:00
BooleanObject.cpp LibJS: Boolean, Number and String prototypes should have values too 2020-04-10 13:09:35 +02:00
BooleanObject.h LibJS: Add Boolean constructor object 2020-04-07 08:41:25 +02:00
BooleanPrototype.cpp LibJS: Boolean, Number and String prototypes should have values too 2020-04-10 13:09:35 +02:00
BooleanPrototype.h LibJS: Boolean, Number and String prototypes should have values too 2020-04-10 13:09:35 +02: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 console.{debug,info,warn,error}() 2020-04-12 18:42:42 +02:00
ConsoleObject.h LibJS: Add console.{debug,info,warn,error}() 2020-04-12 18:42:42 +02: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: Tweak FunctionPrototype::to_string and constructors 2020-04-13 01:14:21 +02:00
DateConstructor.h LibJS: Implement constructor/non-constructor function calls 2020-04-01 20:18:36 +02:00
DatePrototype.cpp LibJS: Throw real TypeError, ReferenceError, etc objects 2020-04-10 13:09:35 +02:00
DatePrototype.h LibJS: Implement Date.prototype.to{Date,Time}String() 2020-03-30 21:43:35 +02:00
Error.cpp LibJS: Use enumerator macros for boilerplate code around native types 2020-04-10 14:06:52 +02:00
Error.h LibJS: Implement Error.prototype.name setter (#1776) 2020-04-13 11:19:53 +02:00
ErrorConstructor.cpp LibJS: Tweak FunctionPrototype::to_string and constructors 2020-04-13 01:14:21 +02:00
ErrorConstructor.h LibJS: Use enumerator macros for boilerplate code around native types 2020-04-10 14:06:52 +02:00
ErrorPrototype.cpp LibJS: Implement Error.prototype.name setter (#1776) 2020-04-13 11:19:53 +02:00
ErrorPrototype.h LibJS: Implement Error.prototype.name setter (#1776) 2020-04-13 11:19:53 +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: Make Function and CallFrame aware of their function name 2020-04-11 14:10:42 +02:00
FunctionConstructor.cpp LibJS: Tweak FunctionPrototype::to_string and constructors 2020-04-13 01:14:21 +02:00
FunctionConstructor.h LibJS: Add Function() and Function.prototype 2020-04-04 15:58:49 +02:00
FunctionPrototype.cpp LibJS: Tweak FunctionPrototype::to_string and constructors 2020-04-13 01:14:21 +02:00
FunctionPrototype.h LibJS: Add Function() and Function.prototype 2020-04-04 15:58:49 +02:00
GlobalObject.cpp LibJS: Add String constructor :^) 2020-04-10 14:14:02 +02:00
GlobalObject.h LibJS: Use enumerator macros for boilerplate code around native types 2020-04-10 14:06:52 +02:00
MathObject.cpp LibJS: Add js_negative_infinity() 2020-04-12 14:39:38 +02:00
MathObject.h LibJS: Add Math.{cos,sin,tan}() 2020-04-06 10:58:16 +02:00
NativeFunction.cpp LibJS: Tweak FunctionPrototype::to_string and constructors 2020-04-13 01:14:21 +02:00
NativeFunction.h LibJS: Tweak FunctionPrototype::to_string and constructors 2020-04-13 01:14:21 +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
NumberConstructor.cpp LibJS: Tweak FunctionPrototype::to_string and constructors 2020-04-13 01:14:21 +02:00
NumberConstructor.h LibJS: Add Number.isSafeInteger() 2020-04-07 21:28:43 +02: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: Boolean, Number and String prototypes should have values too 2020-04-10 13:09:35 +02:00
NumberPrototype.cpp LibJS: Boolean, Number and String prototypes should have values too 2020-04-10 13:09:35 +02:00
NumberPrototype.h LibJS: Boolean, Number and String prototypes should have values too 2020-04-10 13:09:35 +02:00
Object.cpp LibJS: Make Function and CallFrame aware of their function name 2020-04-11 14:10:42 +02:00
Object.h LibJS: Add Object.defineProperty() and start caring about attributes 2020-04-10 00:36:06 +02:00
ObjectConstructor.cpp LibJS: Tweak FunctionPrototype::to_string and constructors 2020-04-13 01:14:21 +02:00
ObjectConstructor.h LibJS: Add Object.defineProperty() and start caring about attributes 2020-04-10 00:36:06 +02:00
ObjectPrototype.cpp LibJS: Make Object::to_string() call the "toString" property if present 2020-04-05 18:19:56 +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
PropertyName.h LibJS: Support array holes, encoded as empty JS::Value 2020-04-06 20:27:44 +02:00
ScriptFunction.cpp LibJS: Make Function and CallFrame aware of their function name 2020-04-11 14:10:42 +02:00
ScriptFunction.h LibJS: Make Function and CallFrame aware of their function name 2020-04-11 14:10:42 +02:00
Shape.cpp LibJS: Key shape transitions on both property name and attributes 2020-04-10 16:33:44 +02:00
Shape.h LibJS: Key shape transitions on both property name and attributes 2020-04-10 16:33:44 +02:00
StringConstructor.cpp LibJS: Tweak FunctionPrototype::to_string and constructors 2020-04-13 01:14:21 +02:00
StringConstructor.h LibJS: Add String constructor :^) 2020-04-10 14:14:02 +02:00
StringObject.cpp LibJS: Add "Heap" and "Runtime" subdirectories 2020-03-16 14:37:19 +01:00
StringObject.h LibJS: Boolean, Number and String prototypes should have values too 2020-04-10 13:09:35 +02:00
StringPrototype.cpp LibJS: Add String.prototype.pad{Start,End}() 2020-04-10 16:37:04 +02:00
StringPrototype.h LibJS: Add String.prototype.pad{Start,End}() 2020-04-10 16:37:04 +02:00
Value.cpp LibJS: Add js_negative_infinity() 2020-04-12 14:39:38 +02:00
Value.h LibJS: Add js_negative_infinity() 2020-04-12 14:39:38 +02:00