Re: nsgenbind crash
On Thu, 8 Nov 2012 01:07:24 +, Vincent Sanders wrote: On Wed, Nov 07, 2012 at 10:50:04PM +, Chris Young wrote: On Wed, 7 Nov 2012 22:43:43 +, Vincent Sanders wrote: the tool generates output using positional format specifiers like %1$d which your c library apariently cannot cope with...i will change this to normal ones for you commited, Hmm, still seems to be adding $s and $d. I don't think I'm getting as many errors though, so you've probably just missed one. along with compatability macro magic that *might* mean 1.7 works in mainline javascript/jsapi.h now has a 1.7 section which should be updated with stuff i got wrong ;-) Getting there. I think jsapi.h is ok, but the generated window.c has some trace stuff in it which 1.7 doesn't like. I can get it to build by commenting it out, but I'm not sure how important it is or what it does: build-amiga-amiga/window.c:27: error: expected ) before * token build-amiga-amiga/window.c:33: error: JSCLASS_MARK_IS_TRACE undeclared here (not in a function) build-amiga-amiga/window.c:45: error: jsclass_mark undeclared here (not in a function) build-amiga-amiga/window.c: In function jsapi_property_window_get: build-amiga-amiga/window.c:511: warning: implicit declaration of function JS_SET_RVAL build-amiga-amiga/window.c: At top level: build-amiga-amiga/window.c:2479: error: expected ) before * token I think JS_SET_RVAL should be JSAPI_SET_RVAL though. Thanks Chris
[chr...@care4free.net: Re: NetSurf Developer Workshop]
For later reference. B. ---BeginMessage--- In article 20121108132245.gc26...@pepperfish.net, Rob Kendrick r...@netsurf-browser.org wrote: On Wed, Nov 07, 2012 at 11:35:03PM +, Chris Gransden wrote: In article 20121107230822.GC2863@somnambulist.local, Daniel Silverstone dsilv...@netsurf-browser.org wrote: We're targetting 1.8.5 I'm afraid. We've gotten NSPR building but we're stuck at sorting out mozjs because it gets confused between the host and the target NSPR installs. Is that with or without the jit? I got 1.8.5 to build with the jit turned on but the javascript shell doesn't run. I couldn't work out how to get it to build with the jit turned off. Are you building this natively, or cross-building? Would you care to share your patches for making libmozjs-1.8.5 build targetting RISC OS? I spent an hour or so on this at the hack weekend and gave up because it was a complicated horrific maze of broken autoconf. Hi Rob, I attached a zip file containing the autobuilder recipe. After building NetSurf from scratch again libmozjs 1.8.5 now works. I've tested the patches with GCC 4.7.3 and 4.1.2 although I haven't tested to see whether building NetSurf with libmozjs and 4.1.2 works. I did notice that if nspr isn't installed in the cross builder libmoz fails to build trying to link to the native libraries. Chris. recipe.zip,A91 Description: application/riscos ---End Message---
Re: nsgenbind crash
On Thu, Nov 08, 2012 at 07:18:25PM +, Chris Young wrote: On Thu, 8 Nov 2012 01:07:24 +, Vincent Sanders wrote: On Wed, Nov 07, 2012 at 10:50:04PM +, Chris Young wrote: On Wed, 7 Nov 2012 22:43:43 +, Vincent Sanders wrote: the tool generates output using positional format specifiers like %1$d which your c library apariently cannot cope with...i will change this to normal ones for you commited, Hmm, still seems to be adding $s and $d. I don't think I'm getting as many errors though, so you've probably just missed one. do not *think* so..but i could be wrong. have you made netsurf clean and definitely regenerated with master branch nsgenbind? along with compatability macro magic that *might* mean 1.7 works in mainline javascript/jsapi.h now has a 1.7 section which should be updated with stuff i got wrong ;-) Getting there. I think jsapi.h is ok, but the generated window.c has some trace stuff in it which 1.7 doesn't like. I can get it to build by commenting it out, but I'm not sure how important it is or what it does: build-amiga-amiga/window.c:27: error: expected ) before * token build-amiga-amiga/window.c:33: error: JSCLASS_MARK_IS_TRACE undeclared here (not in a function) build-amiga-amiga/window.c:45: error: jsclass_mark undeclared here (not in a function) build-amiga-amiga/window.c: In function jsapi_property_window_get: build-amiga-amiga/window.c:511: warning: implicit declaration of function JS_SET_RVAL build-amiga-amiga/window.c: At top level: build-amiga-amiga/window.c:2479: error: expected ) before * token This i have fixed already (I think) I think JS_SET_RVAL should be JSAPI_SET_RVAL though. migt be, though some places are using the real spidermonkey macro as its just the native function call that has changed signature every bloody release since 1.7.0 :-( Thanks Chris -- Regards Vincent http://www.kyllikki.org/
nsgenjsbind patch: correct prototype for spidermonkey 180
Hello, this patch declares the jsclass_mark function correctly for spidermonkey versions 180. Please apply, thanks. Greets, Olediff --git a/src/jsapi-libdom.c b/src/jsapi-libdom.c index 41491c1..5c918de 100644 --- a/src/jsapi-libdom.c +++ b/src/jsapi-libdom.c @@ -383,7 +383,7 @@ output_jsclass(struct binding *binding) if (binding-mark != NULL) { fprintf(binding-outfile, - static JSBool jsclass_mark(JSTracer *trc, JSObject *obj);\n\n); + static JSAPI_MARKOP(jsclass_mark);\n\n); } if (binding-has_private || (binding-finalise != NULL)) {
Re: nsgenbind crash
snip fixed stuff This i have fixed already (I think) Still erroring - it doesn't like the JSTracer type and JSCLASS_MARK_IS_TRACE. Looks like there is a different type of callback for 1.7 so might need some compatibility magic there. gah missed compat macro usage, ole pointed it out seconds before you did, fixed now I think JS_SET_RVAL should be JSAPI_SET_RVAL though. migt be, though some places are using the real spidermonkey macro as its just the native function call that has changed signature every bloody release since 1.7.0 :-( Ah, 1.7 doesn't have it though. I've added it to the jsapi.h header. cheers, sometime i may rename JSAPI_SET_RVAL to JSAPI_FN_SET_RVAL to make this obvious -- Regards Vincent http://www.kyllikki.org/
Spidermonkey 1.7 support
Hello, the master now works ok with spidermonkey 1.7 on the first impression. However, the wikipedia example/test doesn't work - no output is shown on the page, and also no exception or assert is shown. I tested document.appendChild(document.createTextNode()) which works well. document.appendChild(document.createElement('br')), fails with an javascript assert in an simple html page. so far and thanks for the work on javascript embedding. Greets, Ole