mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02: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:
Notes:
sideshowbarker
2024-07-19 07:31:28 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/bc1ece7f37c
@@ -33,6 +33,7 @@
|
||||
namespace JS {
|
||||
|
||||
MathObject::MathObject()
|
||||
: Object(interpreter().object_prototype())
|
||||
{
|
||||
put_native_function("abs", abs, 1);
|
||||
put_native_function("random", random);
|
||||
|
||||
Reference in New Issue
Block a user