In V8, we can use the GC to directly tie the Rust Struct to the JS Object. We Probably should use that because the current implementation uses a Rc<RefCell> mess. The Rc gets cloned for every method that might be executed and needs a Reference to the struct itself.
Additionally, the old approach with a Rc does not work when we correctly make use of the prototypes in JS.
Somehow still need to be able to use the Objects Allocated on the V8 heap without knowing that they live on and are managed by the V8 heap.
In V8, we can use the GC to directly tie the Rust Struct to the JS Object. We Probably should use that because the current implementation uses a
Rc<RefCell>mess. TheRcgets cloned for every method that might be executed and needs a Reference to the struct itself.Additionally, the old approach with a
Rcdoes not work when we correctly make use of the prototypes in JS.Somehow still need to be able to use the Objects Allocated on the V8 heap without knowing that they live on and are managed by the V8 heap.