Cppuno in bridges, HELP needed.

Stephan Bergmann sbergman at redhat.com
Tue Mar 6 13:17:29 UTC 2018


On 06.03.2018 11:38, Jan Iversen wrote:
> At some point a piece of code (in the same executable) decides to make a uno call, this looks like
> 
> Cpp2uno_call() ->
> 	raise_exception()
> 		__cxa_throw() ->
> 		( C++ throw handling) ->
> 			getCaughtException() ->
> 				UnoInterfaceProxyDispatch() ->
> 					cpp_call() ->
> 						CallVirtualMethod() ->
> 							( Call requested function )

Hard to tell what you're actually looking at without seeing a real 
backtrace (e.g., I have no idea what "Cpp2uno_call()" is supposed to mean).

As there is "getCaughtException()" in your picture: 
cppu::getCaughtException (cppuhelper/exc_hlp.hxx) internally uses the 
bridge between C++ and binary UNO to translate the C++ exception being 
caught by the current catch block into a css::uno::Any.  You need that 
bridge in all its glory, beautiful assembler hackery and all, for that 
functionality to work.

> Because on iOS, no external process will ever call the UNO interface, it is 1 single executable (I also removed the pipes etc).

Just to be clear:  The bridge between C++ and binary UNO is used in more 
scenarios than just inter-process communication.  Other examples are 
bridging to code in other languages like Java, the thread-affine bridge 
used by some (Java) database code, or cppu::getCaughtException mentioned 
above.  While the former examples may not be relevant on iOS, the latter 
one certainly is.


More information about the LibreOffice mailing list