mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +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
30 changed files with 60 additions and 28 deletions
|
@ -44,7 +44,8 @@ CanvasRenderingContext2DWrapper* wrap(JS::Heap& heap, CanvasRenderingContext2D&
|
|||
}
|
||||
|
||||
CanvasRenderingContext2DWrapper::CanvasRenderingContext2DWrapper(CanvasRenderingContext2D& impl)
|
||||
: m_impl(impl)
|
||||
: Wrapper(*interpreter().object_prototype())
|
||||
, m_impl(impl)
|
||||
{
|
||||
put_native_property("fillStyle", fill_style_getter, fill_style_setter);
|
||||
put_native_function("fillRect", fill_rect, 4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue