[Libreoffice-commits] core.git: cppuhelper/source

Michael Weghorn (via logerrit) logerrit at kemper.freedesktop.org
Thu Mar 5 19:18:02 UTC 2020


 cppuhelper/source/exc_thrower.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit cd6b32ef1f3348ce8e529c5f808b704ff728c240
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Thu Mar 5 16:55:17 2020 +0100
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Thu Mar 5 20:17:24 2020 +0100

    tdf#127781 Android Viewer: aarch64: Avoid throwing exceptions through bridges
    
    This basically extends what commit
    eb15ac837e06087fb8148330e9171d6697d89ee6 ("android: Avoid
    throwing exceptions through the bridges.", 2019-11-29), amended
    by f2f8a2ec10d87ffb23949338a9e4da1e1d704644 ("android:
    Actually let's avoid the exceptions via bridges only on aarch4.",
    2019-12-02) did for the online-based Android app to cover the Android
    Viewer case as well.
    
    This makes Android Viewer work on aarch64, which previously crashed
    whenever trying to load a document.
    
    Change-Id: Id8b30e1dced583159cc4d81aaa18f4c25b901cff
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90047
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>

diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx
index 5fa7c7330fe5..7c40d12db16e 100644
--- a/cppuhelper/source/exc_thrower.cxx
+++ b/cppuhelper/source/exc_thrower.cxx
@@ -173,7 +173,7 @@ ExceptionThrower::ExceptionThrower()
 
 class theExceptionThrower : public rtl::Static<ExceptionThrower, theExceptionThrower> {};
 
-#if defined(IOS) || (defined(__aarch64__) && HAVE_FEATURE_ANDROID_LOK)
+#if defined(IOS) || (defined(__aarch64__) && defined(ANDROID))
 // In the native iOS / Android app, where we don't have any Java, Python,
 // BASIC, or other scripting, the only thing that would use the C++/UNO bridge
 // functionality that invokes codeSnippet() was cppu::throwException().
@@ -211,7 +211,7 @@ void lo_mobile_throwException(css::uno::Any const& aException)
 
     assert(false);
 }
-#endif // defined(IOS) || (defined(__aarch64__) && HAVE_FEATURE_ANDROID_LOK)
+#endif // defined(IOS) || (defined(__aarch64__) && defined(ANDROID))
 
 } // anonymous namespace
 
@@ -229,7 +229,7 @@ void SAL_CALL throwException( Any const & exc )
             "(must be derived from com::sun::star::uno::Exception)!" );
     }
 
-#if defined(IOS) || (defined(__aarch64__) && HAVE_FEATURE_ANDROID_LOK)
+#if defined(IOS) || (defined(__aarch64__) && defined(ANDROID))
     lo_mobile_throwException(exc);
 #else
     Mapping uno2cpp(Environment(UNO_LB_UNO), Environment::getCurrent());
@@ -252,7 +252,7 @@ void SAL_CALL throwException( Any const & exc )
 
 Any SAL_CALL getCaughtException()
 {
-#if defined(__aarch64__) && HAVE_FEATURE_ANDROID_LOK
+#if defined(__aarch64__) && defined(ANDROID)
     // FIXME This stuff works on 32bit ARM, let's use the shortcut only for
     // the 64bit ARM.
     return Any();


More information about the Libreoffice-commits mailing list