1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +00:00

LibJS: Make AggregateError inherit from Error

This is our way of implementing the [[ErrorData]] internal slot, which
is being used in Object.prototype.toString().
This commit is contained in:
Linus Groh 2021-06-23 13:59:17 +01:00
parent 0e8cbfb7b5
commit c503a28e19
3 changed files with 7 additions and 4 deletions

View file

@ -5,7 +5,7 @@
*/
#include <LibJS/Runtime/AggregateError.h>
#include <LibJS/Runtime/Array.h>
#include <LibJS/Runtime/Error.h>
#include <LibJS/Runtime/GlobalObject.h>
namespace JS {
@ -16,7 +16,7 @@ AggregateError* AggregateError::create(GlobalObject& global_object)
}
AggregateError::AggregateError(Object& prototype)
: Object(prototype)
: Error(prototype)
{
}