1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 15:32:13 +00:00
serenity/Libraries/LibJS
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
..
Heap LibJS: Throw real TypeError, ReferenceError, etc objects 2020-04-10 13:09:35 +02:00
Runtime LibJS: Implement Error.prototype.name setter (#1776) 2020-04-13 11:19:53 +02:00
Tests LibJS: Implement Error.prototype.name setter (#1776) 2020-04-13 11:19:53 +02:00
AST.cpp LibJS: Parse "this" as ThisExpression 2020-04-13 00:45:25 +02:00
AST.h LibJS: Parse "this" as ThisExpression 2020-04-13 00:45:25 +02:00
Forward.h LibJS: Use enumerator macros for boilerplate code around native types 2020-04-10 14:06:52 +02:00
Interpreter.cpp LibJS: Throw on assignment of an const variable 2020-04-13 01:12:31 +02:00
Interpreter.h LibJS: Add console.trace() 2020-04-11 14:10:42 +02:00
Lexer.cpp LibJS: Parse "this" as ThisExpression 2020-04-13 00:45:25 +02:00
Lexer.h LibJS: Allow lexer to run without logging errors 2020-04-05 16:11:13 +02:00
Makefile LibJS: Add String constructor :^) 2020-04-10 14:14:02 +02:00
Parser.cpp LibJS: Parse "this" as ThisExpression 2020-04-13 00:45:25 +02:00
Parser.h LibJS: Do not execute scripts with parse errors 2020-04-13 10:42:25 +02:00
Token.cpp LibJS: Add numeric literal parsing for different bases and exponents 2020-04-05 16:01:22 +02:00
Token.h LibJS: Parse "this" as ThisExpression 2020-04-13 00:45:25 +02:00