summaryrefslogtreecommitdiff
path: root/bridges
AgeCommit message (Collapse)Author
2015-02-02add back typedef (regression from fe480d8136b204c8dc6c68916cce7e816f8b9c48)Andras Timar
Change-Id: Ia367fcd3b204b9dd96f5fa6d3a52d0895bd9c0c9
2015-01-29Extract loplugin:redundantcast from loplugin:cstylecastStephan Bergmann
Change-Id: I08f17dd9cc092206083ff41bbbc178e0322e86d0
2015-01-29loplugin:cstylecast (Mac OS X)Stephan Bergmann
Change-Id: Ia8f2c9f1c1c284708a2cbde379197ec6ba58742f
2015-01-29rhbz#1186897: bridges: oops, fix s390 bridge buildMichael Stahl
Change-Id: I5f2393b13729ab43ad2cfd4a3f960a507e3e608b
2015-01-28fix enable-assert-always-abort buildCaolán McNamara
Change-Id: Icbab4d030877f978babfc51f984fb4793b60f681
2015-01-28Some more loplugin:cstylecast clean-upStephan Bergmann
Change-Id: I132d22e2af3cf673c17d8964f690d48990834884
2015-01-28remove unused typedefsNoel Grandin
found with some minor modifications to find/find-unused-defines.sh Change-Id: I18cc479adedc7a0dada68a4aeef08300e62631dd Reviewed-on: https://gerrit.libreoffice.org/14194 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-22loplugin:cstylecast (MACOSX)Stephan Bergmann
Change-Id: Iaefde6a2fbe1b37f31435217c9f57d611d255b11
2015-01-21loplugin:cstylecastStephan Bergmann
Change-Id: Ib8575109cfe0339f2d8b56741d3ad2a538ecf164
2015-01-20Some more loplugin:cstylecast: bridgesStephan Bergmann
Change-Id: Ic224abf67acb212ee20ccf9eb81b5ed5edf851b9
2015-01-16fdo#72755: Only use double mmap as fallbackStephan Bergmann
...when write+exec mmap fails (due to SELinux deny_execmem). This avoids the tmp file creation in environments that don't need it and which in turn have problems of their own with that tmp file business. An alternative would be to first check whether SELinux deny_execmem is enforced and only then try double mmap first. An advantage could be that it might avoid false SELinux alerts in that case. The disadvantage would be the overhead of introducing a conditional dependency on libselinux here. And given that for one deny_execmem typically appears to be off by default (as at least both contemporary GNOME desktop and OpenJDK malfunction when it is enabled), and for another I guess deny_execmem could still change its value between the time of checking for it and the time of requesting a write+exec mmap, that just does not seem worth it. Change-Id: I3560803139b630557b6219d3db52945c7e0cdcd2
2015-01-08loplugin:cstylecast,stringconstantStephan Bergmann
Change-Id: Iffc8cbf108310099318e37378c4b3033ea087cee
2015-01-07loplugin:cstylecast: bridgesStephan Bergmann
Change-Id: I7c41b90c9af045fd452ee62ed0c5d9b261236855
2015-01-07Revert "Revert "boost::unordered_map->std::unordered_map""Stephan Bergmann
This reverts commit 3976739f2378391fa09379c48844daf0e2790f5b, the problem mentioned there was caused by a different commit, and has meanwhile been fixed.
2015-01-06Replace JNIEXPORT -> SAL_JNI_EXPORTStephan Bergmann
cf. 9a745cbf549aa391be2b67f41c83056bd44db97a "Introdude SAL_JNI_EXPORT and use that instead of JNIEXPORT" Change-Id: I81dcc8dfcb878d3e935d807f491b99927637c23c
2015-01-06Revert "boost::unordered_map->std::unordered_map"Caolán McNamara
as an experiment to see if that's somehow the cause of NEXT An uncaught exception of type com.sun.star.sdbc.SQLException NEXT - General error: java.lang.UnsatisfiedLinkError: com.sun.star.sdbcx.comp.hsqldb.StorageFileAccess.isStreamElement(Ljava/lang/String;Ljava/lang/String;)Z NEXT ##Failure Location unknown## : Error Test name: HSQLDBTest::testEmptyDBConnection NEXT An uncaught exception of type com.sun.star.sdbc.SQLException NEXT - General error: java.lang.UnsatisfiedLinkError: com.sun.star.sdbcx.comp.hsqldb.StorageFileAccess.isStreamElement(Ljava/lang/String;Ljava/lang/String;)Z under clang This reverts commit ce7f442bd0b600c0acc74d4757e894a2ba382c53. Change-Id: Ieed0be5721953b9644e4be411173e0ea73f33ed8
2015-01-05Fix build error with libstdc++ 4.7 and ClangTor Lillqvist
Using std::unordered_map causes a complex multi-line error message, call to implicitly-deleted copy constructor of 'jni_uno::JNI_type_info_holder' etc. Revert ce7f442bd0b600c0acc74d4757e894a2ba382c53 for one source file. Change-Id: I24453498d3fcaadf900f2bb56a2812f8bce55dd4
2015-01-05boost::unordered_map->std::unordered_mapCaolán McNamara
Change-Id: I3a16703727f1a421e0ed18079e14219a4feeb8c8
2015-01-05java: unnecessary importsNoel Grandin
found by CodePro Change-Id: If1b75e43f81d70984422e437147048a491395b66
2015-01-05java: remove more dead codeNoel Grandin
found by looking for unused parameters (in Eclipse) Change-Id: I03cf9bc8312e59747b2d0ac153ee2fc8d76be893
2015-01-04boost::unordered_map->std::unordered_mapCaolán McNamara
Change-Id: I5d458f43616edc395faa8c27edaddc7d515166db
2015-01-02No need for USE_DOUBLE_MMAP on OS XTor Lillqvist
I had introduced it with d83de4b1a93ba7ed7bc3243073be3de96a44bfa9 in 2012, when the C++/UNO bridge for 64-bit OS X was created mostly as a copy of the Linux one. Stephan says that the only need for USE_DOUBLE_MMAP should be on SELinux anyway, so most likely also its use for the various BSDs and Android are copypasta or cargo cult. Change-Id: I1c16e830e5e8269b78b14837a9127a98612a6e54
2014-12-25Uno bridge msvc-x86_64: Fix EH memory and addressing issuesMark Williams
Rewrite of 32-Bit-Code to work under 64 Bit: To use the 32 Bit offset values in the ExceptionType we have to allocate a single allocation block and use it for all code and data. All offsets inside this area are guaranteed to be in 32 bit address range. So we have to calc total memory allocation size for D-tor, C-Tors, ExceptionType and type_info. ExceptionType is allocated via placement new operator to locate everything inside our mem block. There is one caveat: Struct type_info is kept in a map and was referenced from class ExceptionType. Therefore type_info now is also member of ExceptionType and can be referenced via 32 bit offset. Change-Id: I6b524e36975a66fb64ca0cfb014c207053acec90 Reviewed-on: https://gerrit.libreoffice.org/13653 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2014-12-19java: unused importsNoel Grandin
Change-Id: I7866959b9ea36c81003259cd387a001e9f34f26a
2014-12-18bridges: Use appropriate OUString functions on string constantsStephan Bergmann
Change-Id: I72e0df381bd9525ea4fff1f4bbd57ffe84ce241f
2014-12-16bridges: Use appropriate OUString functions on string constantsStephan Bergmann
Change-Id: I95ec7503ab7cf0309427118cc5af95eba4f5785b
2014-12-15java: remove some unused fields and variablesNoel Grandin
Change-Id: I5d6071096307adbe7df0178000346cf915afa3e7 Reviewed-on: https://gerrit.libreoffice.org/13477 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-15add link to mkstemp coverity warning wrt threading fiascoCaolán McNamara
Change-Id: Ic8fea32a163ca5e85ac3e2a34d04e4fa1a1943f9
2014-12-11Fix JNI calls to AsynchronousFinalizerStephan Bergmann
...make sure the class is actually found, etc. Change-Id: I5459d531be39b07594a975ae708a7611d1667a2f
2014-12-11Store JNI_info in JniUnoEnvironmentData instead of BridgeStephan Bergmann
...to have it available during JNI-UNO's uno_initEnvironment (see next) Change-Id: I7a2f27b512fc74f418b4648d92dafbf0304eaa96
2014-12-11better documentationStephan Bergmann
Change-Id: Ife9a98cfe2166ccc7aac3904c7be4ea71443d857
2014-12-11Move JniUnoEnvironmentData into its own include fileStephan Bergmann
Change-Id: I8e6fb1fc0acff781dd6e6b62018c7ccd5d0e2307
2014-12-11Rename Context -> JniUnoEnvironmentDataStephan Bergmann
Change-Id: I97879d250ed0ed20d5e129ff3af6dbc2f5759078
2014-12-11bridges: fix gcc3_linux_arm buildMiklos Vajna
Change-Id: I3bfaeab9dd9f2d8cd603c655ec3aa7c4f508c673
2014-12-11reduce scope of local variablesMichael Weghorn
This addresses some cppcheck warnings. Change-Id: I1122494e295af756ef3cc32717fe204505aeb9e3 Reviewed-on: https://gerrit.libreoffice.org/13335 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-11java: reduce visibility of fields and methodsNoel Grandin
found by PMD Change-Id: Id6737916b68ccbdbdeec5d314747a38410923ac6 Reviewed-on: https://gerrit.libreoffice.org/13409 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-10java: improve use of WrappedTargetException to set cause properlyNoel Grandin
since we introduced the new constructors that pass the cause all the way up to java.lang.Throwable. Also simplify some exeception printing sites, because Throwable will correctly print out child exceptions for us. Change-Id: Ibbecce3c6f971fbc80d6de2052ab4f33a4503c0a
2014-12-10Typo: nuber=>numberJulien Nabet
Change-Id: Idc87ab05f817a21e491537a1fa4c014c5a313bf6
2014-12-09Uno bridge: Apply debug info setting to noopt codeDavid Ostrovsky
Change-Id: Id949718baf77bb7e2d276d3db08f68149c114796 Reviewed-on: https://gerrit.libreoffice.org/13364 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2014-12-09Fix base+offset pointer calculations when synthesizing exception dataStephan Bergmann
...but the code does not yet work: Care must be taken to allocate the various data structures close enough together so that the offset calculations at the four places now marked with assert(...); //TODO actually succeed. Change-Id: I1fedf7d2d3cdde5035842b4ad5eca9ad9ccf2d44
2014-12-09Fix mscx_filterCppException base+offset pointer calculationsStephan Bergmann
Change-Id: I9fbe8d7eba181cbfcab704761e6feebd78120644
2014-12-09rhbz#1036877: Join Java AsynchronousFinalizer thread well before exitStephan Bergmann
AsynchronousFinalizer was originally added as 870a4401c05beec3d31c1f6055a64591edd0a9d9 "INTEGRATION: CWS mtg1: #i57753# Avoid long-running finalize methods" referring to <https://issues.apache.org/ooo/show_bug.cgi?id=57753> " Fix JNI-UNO bridge so that the JVM doesn't run out of memory when a destructor locks the SolarMutex." It is unclear to me how relevant "If JVMs are getting more mature and should no longer have problems with long-running finalize methods, this class could be removed again" really is in practice. After all, advice on hotspot-gc-devel is to avoid finalize() if possible (<http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2014-June/010215.html> "Re: History of finalizer execution and gc progress?"). So stick with this approach of home-grown draining for now (where a home-grown approach using PhantomReferencens would need a dedicated draining thread, too, so would not have much benefit over the existing code in practice). Timely termination of AsynchronousFinalizer threads is achieved by using a dedicated thread per bridge and joining it in the remote bridge's dispose() resp. the JNI environment's new java_env_dispose. Change-Id: Idcef2dbf361a1de22f60db73828f59e85711aea7
2014-12-08Mark classes as noncopyableStephan Bergmann
Change-Id: I4262fb56d681c70a089638b876dc07b1f472f583
2014-12-03Fold URE: WindowsStephan Bergmann
...assuming the delayLoadHook in cli_ure/source/native/native_bootstrap.cxx is no longer necessary and loading of cppuhelper from the program dir cannot fail regardless in whatever scenario the cli_cppuhelper library itself is loaded. Change-Id: I13f32b327bca4cce9780864f5e57cdad3860afe5
2014-12-02except.cxx: Fix pTypeDescr is unknown in this context errorDavid Ostrovsky
Change-Id: Ic47f69b01cf17a55901e9e3541419d9f477d9585 Reviewed-on: https://gerrit.libreoffice.org/13210 Tested-by: David Ostrovsky <david@ostrovsky.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2014-12-02MSVC 2013: Compute uno bridge exception offset for X64David Ostrovsky
Change-Id: I34b308db422d861098fdf93cff8fea63128ba47a Reviewed-on: https://gerrit.libreoffice.org/13211 Tested-by: David Ostrovsky <david@ostrovsky.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-28Fold URE: Linux ure/share/java/* -> program/classes/Stephan Bergmann
Change-Id: I86864f832c0377d307cfa0b2c137f452e43797eb
2014-11-28Fold URE: Linux ure/lib/* -> program/Stephan Bergmann
The ../../../program/ links in the URE jar Class-Paths are a temporary kludge (and juh.jar had lacked adaption for Mac OS X). Change-Id: I2542d8a582866485dd61c05df3fc6b4b39a8403d
2014-11-23gcc3_linux_powerpc64 bridges: assert -> static_assert to fix buildRene Engelhard
Change-Id: I9cd345de6895b38fc766b0fe16e218a146bfb7b9
2014-11-23aarch63 bridges: add missing #include <osl/mutex.hxx>Rene Engelhard
Change-Id: Ie422682f38752a5f92336106d40c79d2bf9006c7