1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

LibJS: Pass prototype to Error constructors

This commit is contained in:
Andreas Kling 2020-04-17 19:31:48 +02:00
parent 0df4d2823a
commit 205ac0090d
5 changed files with 30 additions and 15 deletions

View file

@ -154,7 +154,7 @@ public:
template<typename T, typename... Args>
Value throw_exception(Args&&... args)
{
return throw_exception(heap().allocate<T>(forward<Args>(args)...));
return throw_exception(T::create(global_object(), forward<Args>(args)...));
}
Value throw_exception(Exception*);