codegooglecom / libproxy

Automatically exported from code.google.com/p/libproxy
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Cannot compile with Firefox 4 #155

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Try to compile against Firefox 4
2.
3.

What is the expected output? What do you see instead?
Compilation works.

What version of the product are you using? On what operating system?
Linux 2.6.37, Firefox Beta 9

Please provide any additional information below.
pacrunner_mozjs.cpp fails to compile because:
* uses removed functions JS_GetStringBytes and JS_NewString
* JS_DefineFunction expects different function argument

Original issue reported on code.google.com by apwat...@googlemail.com on 20 Jan 2011 at 10:54

GoogleCodeExporter commented 9 years ago
Here is a patch allowing it to build, I did not however carefully check that it 
is correct, or even test it.

Original comment by pterjan on 22 Jan 2011 at 7:05

Attachments:

GoogleCodeExporter commented 9 years ago
Are you aware if this patch is compatible with older version of xulrunner ?

Reminds me that PacRunners are still missing unit tests ... 

Original comment by nicolas.dufresne@gmail.com on 27 Jan 2011 at 6:51

GoogleCodeExporter commented 9 years ago
The part about strings should be fine, but I can't find anything about the 
JSNative part

Original comment by pterjan on 27 Jan 2011 at 7:37

GoogleCodeExporter commented 9 years ago
due to an API change in xulrunner 2.0b10, mozjs pacrunner crashes in this 
situation (with the patch applied it builds, but crashes).

Seems the JS_ObjectNew is no longer usable

Original comment by dominiqu...@gmail.com on 6 Feb 2011 at 1:40

GoogleCodeExporter commented 9 years ago
A proposed fix for building with mozilla 4 (tested with xulrunner 2.0b10).

Original comment by dominiqu...@gmail.com on 8 Feb 2011 at 11:26

Attachments:

GoogleCodeExporter commented 9 years ago
Patch commited as r786

Original comment by dominiqu...@gmail.com on 15 Feb 2011 at 8:33

GoogleCodeExporter commented 9 years ago
Even with that patch, it doesn't build with xulrunner 2.0rc1. I'm getting the 
following error:

[ 77%] Building CXX object 
libproxy/CMakeFiles/pacrunner_mozjs.dir/modules/pacrunner_mozjs.cpp.o
In file included from 
/build/src/libproxy-0.4.6/libproxy/modules/pacrunner_mozjs.cpp:34:0:
/usr/include/xulrunner-2.0/jsapi.h:828:5: warning: unused parameter 'cx'
/usr/include/xulrunner-2.0/jsapi.h:3815:1: warning: unused parameter 'cx'
/usr/include/xulrunner-2.0/jsapi.h:3855:1: warning: unused parameter 'cx'
/build/src/libproxy-0.4.6/libproxy/modules/pacrunner_mozjs.cpp:102:1: error: 
invalid conversion from 'JSBool (*)(JSContext*, JSObject*, jsid, jsval*)' to 
'JSBool (*)(JSContext*, JSObject*, jsid, JSBool, jsval*)'
/build/src/libproxy-0.4.6/libproxy/modules/pacrunner_mozjs.cpp:102:1: warning: 
missing initializer for member 'JSClass::reserved'
make[2]: *** 
[libproxy/CMakeFiles/pacrunner_mozjs.dir/modules/pacrunner_mozjs.cpp.o] Error 1
make[2]: Target `libproxy/CMakeFiles/pacrunner_mozjs.dir/build' not remade 
because of errors.
make[1]: *** [libproxy/CMakeFiles/pacrunner_mozjs.dir/all] Error 2

Original comment by snowmani...@gmail.com on 18 Mar 2011 at 4:53