﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
42	Unable to comile against libmozjs185	djay		"When I tried to compile the ZOO-Kernel 1.2.0-rc2 using the Spider monkey version 1.0.0  downloaded from [https://developer.mozilla.org/En/SpiderMonkey/Getting_SpiderMonkey_source_code#Downloading_gzipped_SpiderMonkey_source_code here], it failed.

When I run configure script it was not able to detect any libmozjs library as the libmozjs was renamed into libmozjs185.

As it should be specific to the way I installed Spider Monkey, I tried to find the libmozjs package on Debian distribution again, then I discover that the same apply to Debian package, which was renamed to {{{libmozjs185-dev}}}. The library should be renamed in the {{{configure.ac}}} file to be detected properly.

I made this changes locally then the configure script worked and detect properlly the libmozjs185. But the JSAPI we are using changed a bit, so work were still required to change the internal js code we were using. 

{{{JSScript}}} disapear and should be replaced by [https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JSObject JSObject]. This affect the {{{loadZooApiFile}}} function.

{{{JS_GetStringBytes}}} disapear and should be replaced by [https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_EncodeString JS_EncodeString].

C functions signature should change to be used from !JavaScript service code, when we got:

{{{
JSBool <myFunction>(JSContext*,JSObject*,uintN,jsval *,jsval *);
}}}

We should now get the following signature:

{{{
JSBool <myFunction>(JSContext*,uintN,jsval *);
}}}

Note also that the {{{jsval*}}} is now used to store both the arguments used when calling the function from !JavaScript code (access using the [https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JSFastNative JS_ARGV] function) and the return value (set return value using the [https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JSFastNative JS_SET_RVAL] function).

This affect the {{{ZOORequest}}} and {{{ZOOUpdate}}} functions.

As [https://developer.mozilla.org/en/JS_CompileFileHandle JS_CompileFileHandle] return {{{JSScript*}}} we replaced it by [https://developer.mozilla.org/en/JS_CompileFile JS_CompileFile].

"	defect	closed	major	1.2.0	zoo-kernel		fixed		
