mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:45:07 +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
40 changed files with 131 additions and 101 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <LibJS/Heap/Heap.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibWeb/Bindings/WindowObject.h>
|
||||
#include <LibWeb/Bindings/XMLHttpRequestConstructor.h>
|
||||
#include <LibWeb/Bindings/XMLHttpRequestWrapper.h>
|
||||
|
@ -35,7 +36,7 @@ namespace Web {
|
|||
namespace Bindings {
|
||||
|
||||
XMLHttpRequestConstructor::XMLHttpRequestConstructor()
|
||||
: NativeFunction(*interpreter().function_prototype())
|
||||
: NativeFunction(*interpreter().global_object().function_prototype())
|
||||
{
|
||||
put("length", JS::Value(1));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue