subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1492954 - /subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNClient.cpp
Date Fri, 14 Jun 2013 04:58:03 GMT
Author: brane
Date: Fri Jun 14 04:58:03 2013
New Revision: 1492954

URL: http://svn.apache.org/r1492954
Log:
On the javahl-ra branch:

[in subversion/bindings/javahl/src]
* org/apache/subversion/javahl/native/SVNClient.cpp
  (SVNClient::openRemoteSession): Add comments to clarify object ownership.

Modified:
    subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNClient.cpp

Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNClient.cpp?rev=1492954&r1=1492953&r2=1492954&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNClient.cpp Fri Jun
14 04:58:03 2013
@@ -1569,7 +1569,10 @@ SVNClient::openRemoteSession(const char*
     if (JNIUtil::isJavaExceptionThrown())
         return NULL;
 
+    /* Decouple the RemoteSession's context from SVNClient's context
+       by creating a copy of the prompter here. */
     Prompter* prompter = new Prompter(context.getPrompter());
+
     jobject jremoteSession = NULL;
     RemoteSession* session = new RemoteSession(
         &jremoteSession, path_info.url, path_info.uuid,
@@ -1578,6 +1581,7 @@ SVNClient::openRemoteSession(const char*
         prompter, jctx);
     if (JNIUtil::isJavaExceptionThrown() || !session)
     {
+        /* context.getSelf() created a new global reference. */
         JNIUtil::getEnv()->DeleteGlobalRef(jctx);
         jremoteSession = NULL;
         delete session;



Mime
View raw message