Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4173
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/73/4173/1
rhbz#908819: Don't call code in UNO object ctor that throws UNO exceptions
...with Context set to this, that leads to refcounting bugs. This is a backport
of the relevant parts of 4e42ce3271154904b7478b9ed5e6e6856b9235c2 "Don't call
code in UNO object ctor that throws UNO exceptions."
Change-Id: Ie6fdf92fdf537b752cd05ed69c3b59f2c7795e28
---
M cppuhelper/source/defaultbootstrap.cxx
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx
index 7fd1e4a..e027564 100644
--- a/cppuhelper/source/defaultbootstrap.cxx
+++ b/cppuhelper/source/defaultbootstrap.cxx
@@ -590,12 +590,12 @@
private osl::Mutex, public ServiceManagerBase, private boost::noncopyable
{
public:
- explicit ServiceManager(rtl::OUString const & rdbUris):
- ServiceManagerBase(*static_cast< osl::Mutex * >(this))
- { readRdbs(rdbUris); }
+ ServiceManager(): ServiceManagerBase(*static_cast< osl::Mutex * >(this)) {}
using ServiceManagerBase::acquire;
using ServiceManagerBase::release;
+
+ void init(rtl::OUString const & rdbUris) { readRdbs(rdbUris); }
void setContext(
css::uno::Reference< css::uno::XComponentContext > const & context)
@@ -1996,7 +1996,8 @@
css::uno::Reference< css::registry::XSimpleRegistry > const & typeRegistry,
rtl::OUString const & serviceUris, rtl::Bootstrap const & bootstrap)
{
- rtl::Reference< ServiceManager > smgr(new ServiceManager(serviceUris));
+ rtl::Reference< ServiceManager > smgr(new ServiceManager);
+ smgr->init(serviceUris);
cppu::ContextEntry_Init entry;
std::vector< cppu::ContextEntry_Init > context_values;
context_values.push_back(
--
To view, visit https://gerrit.libreoffice.org/4173
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6fdf92fdf537b752cd05ed69c3b59f2c7795e28
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-3-6
Gerrit-Owner: Stephan Bergmann <sbergman@redhat.com>
Context
- [PATCH libreoffice-3-6] rhbz#908819: Don't call code in UNO object ctor that throws ... · Stephan Bergmann (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.