You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/02/01 18:39:23 UTC
svn commit: r1239228 - in /incubator/mesos/trunk/src/java/jni:
org_apache_mesos_MesosExecutorDriver.cpp
org_apache_mesos_MesosSchedulerDriver.cpp
Author: benh
Date: Wed Feb 1 17:39:22 2012
New Revision: 1239228
URL: http://svn.apache.org/viewvc?rev=1239228&view=rev
Log:
Changed jobject to jweak where necessary.
Modified:
incubator/mesos/trunk/src/java/jni/org_apache_mesos_MesosExecutorDriver.cpp
incubator/mesos/trunk/src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
Modified: incubator/mesos/trunk/src/java/jni/org_apache_mesos_MesosExecutorDriver.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/java/jni/org_apache_mesos_MesosExecutorDriver.cpp?rev=1239228&r1=1239227&r2=1239228&view=diff
==============================================================================
--- incubator/mesos/trunk/src/java/jni/org_apache_mesos_MesosExecutorDriver.cpp (original)
+++ incubator/mesos/trunk/src/java/jni/org_apache_mesos_MesosExecutorDriver.cpp Wed Feb 1 17:39:22 2012
@@ -32,7 +32,7 @@ using std::string;
class JNIExecutor : public Executor
{
public:
- JNIExecutor(JNIEnv* _env, jobject _jdriver)
+ JNIExecutor(JNIEnv* _env, jweak _jdriver)
: jvm(NULL), env(_env), jdriver(_jdriver)
{
env->GetJavaVM(&jvm);
@@ -49,7 +49,7 @@ public:
JavaVM* jvm;
JNIEnv* env;
- jobject jdriver;
+ jweak jdriver;
};
@@ -279,7 +279,7 @@ JNIEXPORT void JNICALL Java_org_apache_m
// Create a weak global reference to the MesosExecutorDriver
// instance (we want a global reference so the GC doesn't collect
// the instance but we make it weak so the JVM can exit).
- jobject jdriver = env->NewWeakGlobalRef(thiz);
+ jweak jdriver = env->NewWeakGlobalRef(thiz);
// Create the C++ executor and initialize the __exec variable.
JNIExecutor* exec = new JNIExecutor(env, jdriver);
Modified: incubator/mesos/trunk/src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp?rev=1239228&r1=1239227&r2=1239228&view=diff
==============================================================================
--- incubator/mesos/trunk/src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp (original)
+++ incubator/mesos/trunk/src/java/jni/org_apache_mesos_MesosSchedulerDriver.cpp Wed Feb 1 17:39:22 2012
@@ -38,7 +38,7 @@ using std::vector;
class JNIScheduler : public Scheduler
{
public:
- JNIScheduler(JNIEnv* _env, jobject _jdriver)
+ JNIScheduler(JNIEnv* _env, jweak _jdriver)
: jvm(NULL), env(_env), jdriver(_jdriver)
{
env->GetJavaVM(&jvm);
@@ -63,7 +63,7 @@ public:
JavaVM* jvm;
JNIEnv* env;
- jobject jdriver;
+ jweak jdriver;
};
@@ -430,7 +430,7 @@ JNIEXPORT void JNICALL Java_org_apache_m
// Create a weak global reference to the MesosSchedulerDriver
// instance (we want a global reference so the GC doesn't collect
// the instance but we make it weak so the JVM can exit).
- jobject jdriver = env->NewWeakGlobalRef(thiz);
+ jweak jdriver = env->NewWeakGlobalRef(thiz);
// Create the C++ scheduler and initialize the __sched variable.
JNIScheduler* sched = new JNIScheduler(env, jdriver);