[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Warnings from the bindings

From: Philip Martin <philip_at_codematters.co.uk>
Date: Fri, 06 Apr 2018 20:21:33 +0100

Branko Čibej <brane_at_apache.org> writes:

> And I don't see these, either. I checked the code and we explicitly use
> a JNI local frame in the core loop of unparseExternals. Try as I might,
> I can't see where all those local references could be coming from.

ImmutableList::for_each appears to be the problem. The following ugly
hack is not correct but does resolve the warning:

Index: subversion/bindings/javahl/native/jniwrapper/jni_list.hpp
===================================================================
--- subversion/bindings/javahl/native/jniwrapper/jni_list.hpp (revision 1828477)
+++ subversion/bindings/javahl/native/jniwrapper/jni_list.hpp (working copy)
@@ -172,8 +172,18 @@ class ImmutableList : public BaseImmutableList
   F for_each(F function) const
     {
       Iterator iter(get_iterator());
- while (iter.has_next())
+ while (true)
+ {
+ m_env.PushLocalFrame(10);
+ bool has_next = iter.has_next();
+ if (!has_next)
+ {
+ m_env.PopLocalFrame();
+ break;
+ }
         function(T(m_env, NativeT(iter.next())));
+ m_env.PopLocalFrame();
+ }
       return function;
     }
 };

-- 
Philip
Received on 2018-04-06 21:21:45 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.