mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-13 06:32:54 +00:00
LibJS: Don't directly teach the heap about the javascript VM or Realm
Instead, smuggle it in as a `void*` private data and let Javascript aware code cast out that pointer to a VM&. In order to make this split, rename JS::Cell to JS::CellImpl. Once we have a LibGC, this will become GC::Cell. CellImpl then has no specific knowledge of the VM& and Realm&. That knowledge is instead put into JS::Cell, which inherits from CellImpl. JS::Cell is responsible for JavaScript's realm initialization, as well as converting of the void* private data to what it knows should be the VM&.
This commit is contained in:
parent
ae6d105f41
commit
c2988a7dd5
Notes:
github-actions[bot]
2024-11-14 14:39:37 +00:00
Author: https://github.com/shannonbooth
Commit: c2988a7dd5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2334
27 changed files with 346 additions and 296 deletions
|
@ -9,6 +9,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/HashMap.h>
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibJS/Heap/GCPtr.h>
|
||||
#include <LibJS/Heap/HeapFunction.h>
|
||||
#include <LibWeb/WebIDL/Types.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue