mozilla-spidermonkey / spidermonkey-embedding-examples

Documentation and examples for embedding the SpiderMonkey JavaScript / WebAssembly engine in their applications.
Other
197 stars 34 forks source link

Example of storing GC ptrs in embedding data structures and handling tracing #9

Closed ptomato closed 5 years ago

ptomato commented 6 years ago

We need an examples/customtracing.cpp that shows how to define your own C++ data structure that has GC pointer members (perhaps the private data of a JSClass?), and how to define a trace() method so that you can use JS::Rooted on it.

tynopex commented 5 years ago

I have the basic cases in #19