openbsd-ports/devel/xulrunner/patches/patch-js_src_liveconnect_nsISecureLiveconnect_h
kurt 9e80ec3311 - fix a 64-bit problem with the LiveConnect feature. From mozilla
bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=345866
  Eventually the java plugin will need this on amd64. okay martynas@
2007-10-14 18:33:09 +00:00

22 lines
651 B
Plaintext

$OpenBSD: patch-js_src_liveconnect_nsISecureLiveconnect_h,v 1.1 2007/10/14 18:34:30 kurt Exp $
--- js/src/liveconnect/nsISecureLiveconnect.h.orig Mon Oct 8 23:41:14 2007
+++ js/src/liveconnect/nsISecureLiveconnect.h Mon Oct 8 23:43:54 2007
@@ -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: