[PATCH] OJI fix for 64-bit platforms

Jung-uk Kim jkim at FreeBSD.org
Tue Oct 9 11:59:51 PDT 2007


On Tuesday 09 October 2007 02:24 pm, Jung-uk Kim wrote:
> Java porting team is working on Java plugin support for amd64 and
> we found the attached patch is necessary for 64-bit platforms to
> support LiveConnect properly with the current Gecko browsers.  The
> patch is obtained from Mozilla trunk:
>
> http://bonsai.mozilla.org/cvsview2.cgi?command=DIFF&subdir=mozilla%
>2Fjs%2Fsrc%2Fliveconnect&file=nsISecureLiveconnect.h&rev1=1.7&rev2=1
>.8&whitespace_mode=show&diff_mode=context
>
> All Mozilla browsers in ports collection (i.e., firefox, firefox15,
> seamonkey, xulrunner, etc.) need it AFAIT.

Sorry, wrong MIME type.  Re-attached.

Jung-uk Kim
-------------- next part --------------
--- js/src/liveconnect/nsISecureLiveconnect.h	15 Nov 2003 00:11:06 -0000	1.7
+++ js/src/liveconnect/nsISecureLiveconnect.h	25 Jul 2006 14:56:10 -0000
@@ -51,7 +51,17 @@
 #include "nsIFactory.h"
 #include "jni.h"
 
+/*
+ * jint is 32 bit, jlong is 64 bit.  So we must consider 64-bit platform.
+ *
+ * http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/types.html#wp428
+ */
+
+#if JS_BYTES_PER_WORD == 8
+typedef jlong jsobject;
+#else
 typedef jint jsobject;
+#endif /* JS_BYTES_PER_WORD == 8 */
 
 class nsISecureLiveconnect : public nsISupports {
 public:


More information about the freebsd-gnome mailing list