mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +00:00
LibJS+LibWeb: Pass prototype to Object constructor
Everyone who constructs an Object must now pass a prototype object when applicable. There's still a fair amount of code that passes something fetched from the Interpreter, but this brings us closer to being able to detach prototypes from Interpreter eventually.
This commit is contained in:
@@ -37,7 +37,8 @@ Error* Error::create(GlobalObject& global_object, const FlyString& name, const S
|
||||
}
|
||||
|
||||
Error::Error(const FlyString& name, const String& message, Object& prototype)
|
||||
: m_name(name)
|
||||
: Object(&prototype)
|
||||
, m_name(name)
|
||||
, m_message(message)
|
||||
{
|
||||
set_prototype(&prototype);
|
||||
|
||||
Reference in New Issue
Block a user