cppuhelper/source/defaultbootstrap.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit 0f7b717a7cd42506f2915ad0aa24e4fb926a9d51 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Jun 6 10:10:21 2013 +0200 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 Reviewed-on: https://gerrit.libreoffice.org/4172 Reviewed-by: LuboÅ¡ LuÅák <l.lu...@suse.cz> Tested-by: LuboÅ¡ LuÅák <l.lu...@suse.cz> diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx index 1fe1aa7..c61c2b0 100644 --- a/cppuhelper/source/defaultbootstrap.cxx +++ b/cppuhelper/source/defaultbootstrap.cxx @@ -589,13 +589,13 @@ class ServiceManager: 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) { @@ -1985,7 +1985,8 @@ css::uno::Reference< css::uno::XComponentContext > bootstrapComponentContext( 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(
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits