On Wed, Feb 12, 2014 at 05:21:51AM -0500, Karl Dahlke wrote: > My latest push adds SWITCH_COMPARTMENT to js.h, as suggested by Adam, > and uses that macro in the establish... and set... functions in jsloc.cpp. > These are gateway functions from html into the javascript world. > I also unrooted a couple more parameters that were rooted > earlier when html did not understand these objects. > This should not change any behavior, it is just a step along the way.
Ok, pulled and now testing. Thanks for correcting my macro definition to correctly handle void as well. > Other functions need to use this macro, > and still other functions don't really need to set compartment > because they are internal. Yeah, sounds like a way ahead. > Then we can write some error legs that close down javascript for this session > upon error, but still let edbrowse continue. Yeah, I guess we'll need some wrappers to do this. Something like we've done for switching compartments i.e. if the operation (new object, new value) fails, print an error and return failure imediately. I can have a look at implementing these if you want. On this subject, what c++ standard do we want to try and conform to? I only ask as I'm wondering if we can just use variadic macros to do this. I'm not sure how readable this would be but it could certainly speed up the process whilst not being that unmaintainable in my opinion. Cheers, Adam. _______________________________________________ Edbrowse-dev mailing list [email protected] http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev
