Ok, it is done. I think it is too big to send to the list, so here's a link: http://the-brannons.com/js.patch The commit message should be a pretty good description of what I've changed, so I won't rehash it here unless someone has questions. I may have made mistakes along the way as well. It's quite possible that I forgot to use JSAutoCompartment in some places where it is needed.
html.cpp is now compilable with g++, but it requires the -fpermissive switch. Turns out that g++ doesn't like Karl's list macros from eb.h, because of the use of void pointers. Since html.cpp is now in C++, it might be a good idea to rewrite the list manipulations to use the list type from C++'s standard template library. But not today. So after doing all that work, I fired up my shiny new edbrowse, and I eventually managed to make it crash. Turns out that in some cases, it has nothing to do with GC at all. The problem is that in a lot of instances, we do not check the return value of JS_NewObject, and it will return NULL on an error (such as heap exaustion). JS_NewObject returned NULL somewhere, and a bit later on in the program, a crash ensued because that NULL got passed to a function that expected a non-NULL. The JS heap is too small. The patch is still necessary, though. -- Chris _______________________________________________ Edbrowse-dev mailing list [email protected] http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev
