mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +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
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibWeb/Bindings/EventWrapper.h>
|
||||
#include <LibWeb/Bindings/MouseEventWrapper.h>
|
||||
#include <LibWeb/DOM/MouseEvent.h>
|
||||
|
@ -40,7 +41,7 @@ EventWrapper* wrap(JS::Heap& heap, Event& event)
|
|||
}
|
||||
|
||||
EventWrapper::EventWrapper(Event& event)
|
||||
: Wrapper(*interpreter().object_prototype())
|
||||
: Wrapper(*interpreter().global_object().object_prototype())
|
||||
, m_event(event)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue