msi: Keep assembly caches loaded until the package is destroyed.

This commit is contained in:
Hans Leidekker 2012-06-12 09:25:09 +02:00 committed by Alexandre Julliard
parent 3480ccbbb4
commit a17ca16495
4 changed files with 7 additions and 13 deletions

View File

@ -1017,7 +1017,6 @@ UINT msi_load_all_components( MSIPACKAGE *package )
r = MSI_IterateRecords(view, NULL, load_component, package);
msiobj_release(&view->hdr);
msi_destroy_assembly_caches( package );
return r;
}

View File

@ -99,9 +99,11 @@ void msi_destroy_assembly_caches( MSIPACKAGE *package )
{
UINT i;
IAssemblyCache_Release( package->cache_sxs );
package->cache_sxs = NULL;
if (package->cache_sxs)
{
IAssemblyCache_Release( package->cache_sxs );
package->cache_sxs = NULL;
}
for (i = 0; i < CLR_VERSION_MAX; i++)
{
if (package->cache_net[i])

View File

@ -399,7 +399,6 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
goto done;
}
}
msi_init_assembly_caches( package );
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
{
comp->Action = msi_get_component_action( package, comp );
@ -414,7 +413,6 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
}
}
}
msi_destroy_assembly_caches( package );
done:
msi_free_media_info(mi);
@ -1309,7 +1307,6 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
msiobj_release( &uirow->hdr );
}
msi_init_assembly_caches( package );
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
{
comp->Action = msi_get_component_action( package, comp );
@ -1328,6 +1325,5 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
remove_folder( folder );
}
}
msi_destroy_assembly_caches( package );
return ERROR_SUCCESS;
}

View File

@ -344,9 +344,10 @@ static void free_package_structures( MSIPACKAGE *package )
static void MSI_FreePackage( MSIOBJECTHDR *arg)
{
UINT i;
MSIPACKAGE *package = (MSIPACKAGE *)arg;
msi_destroy_assembly_caches( package );
if( package->dialog )
msi_dialog_destroy( package->dialog );
@ -354,10 +355,6 @@ static void MSI_FreePackage( MSIOBJECTHDR *arg)
free_package_structures(package);
CloseHandle( package->log_file );
for (i = 0; i < CLR_VERSION_MAX; i++)
if (package->cache_net[i]) IAssemblyCache_Release( package->cache_net[i] );
if (package->cache_sxs) IAssemblyCache_Release( package->cache_sxs );
if (package->delete_on_close) DeleteFileW( package->localfile );
msi_free( package->localfile );
}