summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2010-10-08 08:44:14 +0200
committerJoachim Lingner <jl@openoffice.org>2010-10-08 08:44:14 +0200
commit2f3358d7e0957236319942c6d539a99234698c57 (patch)
tree8e0ffbec56bbf35044627561e85e8783e31943fd /desktop
parent8c1f6c9b46671bc9d3a7dc16d1343cd12a9d0411 (diff)
jl161 #i114933# solve deadlock problem when adding an extension
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx15
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.hxx3
2 files changed, 10 insertions, 8 deletions
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 23fb36ed6a43..709cca86c631 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -531,7 +531,11 @@ ExtensionManager::getSupportedPackageTypes()
{
return m_userRepository->getSupportedPackageTypes();
}
-
+//Do some necessary checks and user interaction. This function does not
+//aquire the extension manager mutex and that mutex must not be aquired
+//when this function is called. doChecksForAddExtension does synchronous
+//user interactions which may require aquiring the solar mutex.
+//Returns true if the extension can be installed.
bool ExtensionManager::doChecksForAddExtension(
Reference<deploy::XPackageManager> const & xPackageMgr,
uno::Sequence<beans::NamedValue> const & properties,
@@ -708,6 +712,9 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
xOldExtension, Reference<task::XAbortChannel>(),
Reference<ucb::XCommandEnvironment>());
tmpExtensionRemoveGuard.reset(xExtensionBackup);
+ //xTmpExtension will later be used to check the dependencies
+ //again. However, only xExtensionBackup will be later removed
+ //from the tmp repository
xTmpExtension = xExtensionBackup;
OSL_ASSERT(xTmpExtension.is());
}
@@ -783,18 +790,16 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
//Use a private AbortChannel so the user cannot interrupt.
try
{
- Reference<ucb::XCommandEnvironment> tmpCmdEnv(
- new TmpRepositoryCommandEnv());
if (xExtensionBackup.is())
{
Reference<deploy::XPackage> xRestored =
xPackageManager->importExtension(
xExtensionBackup, Reference<task::XAbortChannel>(),
- tmpCmdEnv);
+ Reference<ucb::XCommandEnvironment>());
}
activateExtension(
sIdentifier, sFileName, bUserDisabled, false,
- Reference<task::XAbortChannel>(), tmpCmdEnv);
+ Reference<task::XAbortChannel>(), Reference<ucb::XCommandEnvironment>());
}
catch (...)
{
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.hxx b/desktop/source/deployment/manager/dp_extensionmanager.hxx
index d0cb4bb8339f..683f45a1bd6e 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.hxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.hxx
@@ -299,9 +299,6 @@ private:
getPackageManager(::rtl::OUString const & repository)
throw (css::lang::IllegalArgumentException);
- //Do some necessary checks and user interaction. This function does not
- //aquire the extension manager mutex.
- //Returns true if the extension can be installed.
bool doChecksForAddExtension(
css::uno::Reference<css::deployment::XPackageManager> const & xPackageMgr,
css::uno::Sequence<css::beans::NamedValue> const & properties,