LibJS: Pass prototype to Error constructors

This commit is contained in:
Andreas Kling 2020-04-17 19:31:48 +02:00
commit 205ac0090d
Notes: sideshowbarker 2024-07-19 07:31:33 +09:00
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*);