mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 06:18:59 +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:
parent
f6d57c82f6
commit
bc1ece7f37
Notes:
sideshowbarker
2024-07-19 07:31:28 +09:00
Author: https://github.com/awesomekling
Commit: bc1ece7f37
30 changed files with 60 additions and 28 deletions
|
@ -47,7 +47,7 @@ ScriptFunction::ScriptFunction(const FlyString& name, const Statement& body, Vec
|
|||
, m_parameters(move(parameters))
|
||||
, m_parent_environment(parent_environment)
|
||||
{
|
||||
put("prototype", heap().allocate<Object>());
|
||||
put("prototype", Object::create_empty(interpreter(), interpreter().global_object()));
|
||||
put_native_property("length", length_getter, length_setter);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue