summaryrefslogtreecommitdiff
path: root/src/libs/xpcom18a4/java/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/xpcom18a4/java/src')
-rw-r--r--src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp14
-rw-r--r--src/libs/xpcom18a4/java/src/nsJavaWrapper.cpp7
-rw-r--r--src/libs/xpcom18a4/java/src/nsThreadUtils.h4
-rw-r--r--src/libs/xpcom18a4/java/src/org/mozilla/xpcom/XPCOMException.java2
4 files changed, 16 insertions, 11 deletions
diff --git a/src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp b/src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp
index 4b3fa5e0..5649c828 100644
--- a/src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp
+++ b/src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp
@@ -146,7 +146,7 @@ nsresult
InitXPCOMVBox_Impl(JNIEnv* env, jobject aVBoxBinDirectory)
{
#if defined(VBOX_PATH_APP_PRIVATE_ARCH) && defined(VBOX_PATH_SHARED_LIBS)
- rv = RTR3InitDll(0);
+ rv = RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
#else
const char *pszHome = nsnull;
const char *jhome = nsnull;
@@ -174,9 +174,9 @@ InitXPCOMVBox_Impl(JNIEnv* env, jobject aVBoxBinDirectory)
char *pszExePath = (char *)alloca(cchHome + 32);
memcpy(pszExePath, pszHome, cchHome);
memcpy(pszExePath + cchHome, "/javafake", sizeof("/javafake"));
- rv = RTR3InitEx(RTR3INIT_VER_CUR, RTR3INIT_FLAGS_DLL, 0, NULL, pszExePath);
+ rv = RTR3InitEx(RTR3INIT_VER_CUR, RTR3INIT_FLAGS_DLL | RTR3INIT_FLAGS_UNOBTRUSIVE, 0, NULL, pszExePath);
} else {
- rv = RTR3InitDll(0);
+ rv = RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
}
if (jhome)
@@ -354,13 +354,13 @@ XPCOM_NATIVE(getComponentRegistrar) (JNIEnv *env, jobject)
}
#ifdef VBOX
-# include <VBox/com/EventQueue.h>
+# include <VBox/com/NativeEventQueue.h>
# include <iprt/err.h>
extern "C" NS_EXPORT jint JNICALL
XPCOM_NATIVE2(waitForEvents) (JNIEnv *env, jobject, jlong aTimeout)
{
- com::EventQueue* aEventQ = com::EventQueue::getMainEventQueue();
+ com::NativeEventQueue* aEventQ = com::NativeEventQueue::getMainEventQueue();
NS_WARN_IF_FALSE(aEventQ != nsnull, "Null main event queue");
if (!aEventQ)
return -1;
@@ -379,7 +379,11 @@ XPCOM_NATIVE2(waitForEvents) (JNIEnv *env, jobject, jlong aTimeout)
#endif
extern "C" NS_EXPORT jobject JNICALL
+#ifdef VBOX
+XPCOM_NATIVE2(getServiceManager) (JNIEnv *env, jobject)
+#else
XPCOM_NATIVE(getServiceManager) (JNIEnv *env, jobject)
+#endif
{
// Call XPCOM method
nsCOMPtr<nsIServiceManager> sm;
diff --git a/src/libs/xpcom18a4/java/src/nsJavaWrapper.cpp b/src/libs/xpcom18a4/java/src/nsJavaWrapper.cpp
index 35b59b6d..19436f14 100644
--- a/src/libs/xpcom18a4/java/src/nsJavaWrapper.cpp
+++ b/src/libs/xpcom18a4/java/src/nsJavaWrapper.cpp
@@ -1006,7 +1006,7 @@ FinalizeParams(JNIEnv *env, const nsXPTParamInfo &aParamInfo, PRUint8 aType,
aVariant.val.u8;
if (aParamInfo.IsRetval() && !aIsArrayElement) {
*aParam = env->NewObject(shortClass, shortInitMID, value);
- } else if ((aParamInfo.IsOut() || aIsArrayElement) && aParam) {
+ } else if ((aParamInfo.IsOut() || aIsArrayElement) && *aParam) {
env->SetShortArrayRegion((jshortArray) *aParam, aIndex, 1, &value);
}
}
@@ -1495,7 +1495,7 @@ static void makeErrorMessage(nsresult r, char* msg, size_t msgSize)
if (NS_SUCCEEDED (rc))
{
nsCOMPtr <nsIException> ex;
- rc = em->GetExceptionFromProvider(r, NULL, getter_AddRefs (ex));
+ rc = em->GetCurrentException(getter_AddRefs (ex));
if (NS_SUCCEEDED (rc) && ex)
{
nsXPIDLCString emsg;
@@ -1753,8 +1753,9 @@ JAVAPROXY_NATIVE(callXPCOMMethod) (JNIEnv *env, jclass that, jobject aJavaProxy,
}
jobject* javaElement;
+ jobject element = nsnull;
if (!paramInfo.IsRetval()) {
- jobject element = env->GetObjectArrayElement(aParams, i);
+ element = env->GetObjectArrayElement(aParams, i);
javaElement = &element;
} else {
javaElement = &result;
diff --git a/src/libs/xpcom18a4/java/src/nsThreadUtils.h b/src/libs/xpcom18a4/java/src/nsThreadUtils.h
index 9c6a0efd..53f3dbdb 100644
--- a/src/libs/xpcom18a4/java/src/nsThreadUtils.h
+++ b/src/libs/xpcom18a4/java/src/nsThreadUtils.h
@@ -50,11 +50,11 @@ do_GetMainThread() {
return already_AddRefed<nsIThread>(thread);
}
-#include "VBox/com/EventQueue.h"
+#include "VBox/com/NativeEventQueue.h"
inline already_AddRefed<nsIEventQueue> do_GetMainThreadQueue()
{
- com::EventQueue* eq = com::EventQueue::getMainEventQueue();
+ com::NativeEventQueue* eq = com::NativeEventQueue::getMainEventQueue();
NS_ASSERTION(eq != nsnull, "Must be valid");
return eq->getIEventQueue();
}
diff --git a/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/XPCOMException.java b/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/XPCOMException.java
index 44636d54..9eca58f6 100644
--- a/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/XPCOMException.java
+++ b/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/XPCOMException.java
@@ -87,7 +87,7 @@ public class XPCOMException extends RuntimeException {
* @param message detailed message of exception
*/
public XPCOMException(long code, String message) {
- super(message + " (0x" + Long.toHexString(code) + ")");
+ super(message + " (0x" + Long.toHexString(code) + ")");
this.errorcode = code;
}