Re: How do I trace objects on the heap with JS 59
Boris Zbarsky <[email protected]> Mon, 27 Aug 2018 13:14:33 -0400
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
On 8/27/18 1:07 PM, Boris Zbarsky wrote: >> I don't think storing raw JSObject* pointers in the C++ is viable. > > That's correct. Well, unless you're OK with the C++ struct not keeping the JS object alive. In which case, as I said in response to Miles, you can use the objectMovedOp on the JSClass to update weak raw pointers as needed. See documentation at https://searchfox.org/mozilla-central/rev/e126996d9b0a3d7653de205898517f4f5b632e7f/js/public/Class.h#718-733 -Boris