On Sat, Jan 25, 2014 at 11:47:36AM -0500, Karl Dahlke wrote: > I finally read the gc rooted guide, and it makes my head spin, > especially since I am still learning C++ on top of it. > > I wanted to start at the heart of the matter, jwin, > which is a global pointer to a js object.
Yeah, I basically use JS_AddObjectRoot to root jwin when it's created in createJavaContext. This fixes the jwin rooting issue for the moment but as we've now got a c++ html parser (html.cpp) we can and should go for the opaque js struct. In addition: JS::RootedObject *jwin = new JS::RootedObjet Is (I think) according to the gc rooting guide a really bad idea since it keeps a rooted object on the heap which is illegal (it's only valid for the stack). Cheers, Adam. _______________________________________________ Edbrowse-dev mailing list [email protected] http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev
