mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
LibJS: Move builtin prototypes to the global object
This moves us towards being able to run JavaScript in different global objects without allocating a separate GC heap.
This commit is contained in:
parent
cbcf317e76
commit
fca08bd000
Notes:
sideshowbarker
2024-07-19 07:30:59 +09:00
Author: https://github.com/awesomekling
Commit: fca08bd000
40 changed files with 131 additions and 101 deletions
|
@ -31,9 +31,9 @@
|
|||
|
||||
namespace JS {
|
||||
|
||||
NativeFunction* NativeFunction::create(Interpreter& interpreter, GlobalObject&, const FlyString& name, AK::Function<Value(Interpreter&)> function)
|
||||
NativeFunction* NativeFunction::create(Interpreter&, GlobalObject& global_object, const FlyString& name, AK::Function<Value(Interpreter&)> function)
|
||||
{
|
||||
return interpreter.heap().allocate<NativeFunction>(name, move(function), *interpreter.function_prototype());
|
||||
return global_object.heap().allocate<NativeFunction>(name, move(function), *global_object.function_prototype());
|
||||
}
|
||||
|
||||
NativeFunction::NativeFunction(Object& prototype)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue