diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-05-30 11:08:12 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-05-30 12:08:03 +0200 |
commit | b3f2ae52e381f7d5fa466dc9df7d04d3d13ca4b9 (patch) | |
tree | c0e45d2081ffc31c709c104f3784e2c86141cf7b /include | |
parent | e4e03e79fac598a9fafb0da8ab50da9a67c6978e (diff) |
framework: fix crash on Writer startup when using --enable-ext-wiki-publisher
As reported by Julien, once the mediawiki extension is installed, the
xHandler in framework::DispatchProvider::implts_searchProtocolHandler()
points to an UNO component implemented in Java, and we crash in
dynamic_cast<>(), at least on Linux with gcc 7.5 and libstdc++.
This dynamic_cast<>() call was added in commit
c0fa456436947a5c167c652d19a884064b43c03d (tdf#149261 sdext: fix crash on
starting the presenter console for the 2nd time, 2022-05-26), to allow
the presenter console to opt out from protocol handler caching. It was
expected that the proxy object created for a Java UNO component would
simply return nullptr when we try to dynamic_cast<>() it down to a C++
interface.
Fix the problem by moving the interface to an UNO one: this side-steps
the dynamic_cast<>() crash at the price of introducing an UNO interface,
which is not meant to be part of the public UNO API (but at least it's
not published).
It may still make sense to improve the bridges/ code at some stage to
not crash in dynamic_cast<>() on generated Java proxy objects.
Change-Id: Iaac44515339e0dc15dddc3be45ef7dee7331e47a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135114
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/framework/dispatchhelper.hxx | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/include/framework/dispatchhelper.hxx b/include/framework/dispatchhelper.hxx index 1595e2a3cea2..7c89a2d79aac 100644 --- a/include/framework/dispatchhelper.hxx +++ b/include/framework/dispatchhelper.hxx @@ -104,16 +104,6 @@ public: // XEventListener virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent) override; }; - -/// Interface that allows a protocol handler implementation to opt out from framework caching. -class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI CacheInfo -{ -public: - virtual bool IsCachingAllowed() const = 0; - -protected: - ~CacheInfo() noexcept = default; -}; } #endif |