mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibJS: Pass prototype to Error constructors
This commit is contained in:
parent
0df4d2823a
commit
205ac0090d
5 changed files with 30 additions and 15 deletions
|
@ -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*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue