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

Re: [PATCH] Fix JavaHL error in SVNBase::createCppBoundObject

From: Alexandr Miloslavskiy <alexandr.miloslavskiy_at_syntevo.com>
Date: Mon, 5 Oct 2020 11:05:08 +0200

On 05.10.2020 5:17, Nathan Hartman wrote:
> While reviewing r1882115, I wondered what was the original rationale
> for the C++ function SVNBase::createCppBoundObject() to cache clazz's
> ctor's method ID in a locally scoped static variable.

It seems to be the common code style in JavaHL to cache the result of
'GetMethodID()'. I can also understand a performance rationale behind it.

In r846137 (the first commit of javaHL), I counted 11 cached results of
'GetMethodID()' and 2 uncached. From 2 uncached,
'JNIStackElement::JNIStackElement()' was silently changed to be cached
in r850284.

So I think that the error I fixed was a result of mechanically
copy&pasting code and not noticing that it shall not be cached in this
specific function.
Received on 2020-10-05 11:05:22 CEST

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