Kaydet (Commit) 91285075 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#81635 crash after 3rd call to ApplicationScriptLibraryContainer

in PackageImpl::processPackage_

xComponentContext->getServiceManager()->createInstanceWithContext(
                    "com.sun.star.script.ApplicationScriptLibraryContainer"

does not increment the refcount, so on leaving the method the refcount
is decremented by 1, because on the first enter the refcount happens to
be three, then if the extension has more than 3 items in it the refcount
hits 0 here and falls over

some of fdo#79301, fdo#70607, fdo#66706 might be dups of this

regression from 306efefe I believe

Change-Id: I3da50693fe656b68c5555b641d9b32246c8fc208
üst cb7dc89f
...@@ -152,28 +152,28 @@ bool SfxBasicManagerHolder::LegacyPsswdBinaryLimitExceeded( Sequence< OUString > ...@@ -152,28 +152,28 @@ bool SfxBasicManagerHolder::LegacyPsswdBinaryLimitExceeded( Sequence< OUString >
return true; return true;
} }
// Service for application library container // Service for application library container
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_comp_sfx2_ApplicationDialogLibraryContainer_get_implementation( com_sun_star_comp_sfx2_ApplicationDialogLibraryContainer_get_implementation(
css::uno::XComponentContext *, css::uno::XComponentContext *,
css::uno::Sequence<css::uno::Any> const &) css::uno::Sequence<css::uno::Any> const &)
{ {
SfxGetpApp()->GetBasicManager(); SfxGetpApp()->GetBasicManager();
return SfxGetpApp()->GetDialogContainer(); css::uno::XInterface* pRet = SfxGetpApp()->GetDialogContainer();
pRet->acquire();
return pRet;
} }
// Service for application library container // Service for application library container
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_comp_sfx2_ApplicationScriptLibraryContainer_get_implementation( com_sun_star_comp_sfx2_ApplicationScriptLibraryContainer_get_implementation(
css::uno::XComponentContext *, css::uno::XComponentContext *,
css::uno::Sequence<css::uno::Any> const &) css::uno::Sequence<css::uno::Any> const &)
{ {
SfxGetpApp()->GetBasicManager(); SfxGetpApp()->GetBasicManager();
return SfxGetpApp()->GetBasicContainer(); css::uno::XInterface* pRet = SfxGetpApp()->GetBasicContainer();
pRet->acquire();
return pRet;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment