File tree 1 file changed +4
-3
lines changed
src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -700,7 +700,8 @@ public static StreamResourceInfo GetRemoteStream(Uri uriRemote)
700
700
SiteOfOriginContainer sooContainer = ( SiteOfOriginContainer ) GetResourcePackage ( packageUri ) ;
701
701
702
702
// the SiteOfOriginContainer is shared across threads; synchronize access to it
703
- lock ( _packageLock )
703
+ // using the same lock object as other uses (PackWebResponse+CachedResponse.GetResponseStream)
704
+ lock ( sooContainer )
704
705
{
705
706
sooPart = sooContainer . GetPart ( partUri ) as SiteOfOriginPart ;
706
707
}
@@ -2017,8 +2018,9 @@ private static PackagePart GetResourceOrContentPart(Uri uri)
2017
2018
ResourceContainer resContainer = ( ResourceContainer ) GetResourcePackage ( packageUri ) ;
2018
2019
2019
2020
// the ResourceContainer is shared across threads; synchronize access to it
2021
+ // using the same lock object as other uses (PackWebResponse+CachedResponse.GetResponseStream)
2020
2022
PackagePart part = null ;
2021
- lock ( _packageLock )
2023
+ lock ( resContainer )
2022
2024
{
2023
2025
part = resContainer . GetPart ( partUri ) ;
2024
2026
}
@@ -2417,7 +2419,6 @@ private object RunDispatcher(object ignore)
2417
2419
static private bool _appCreatedInThisAppDomain ;
2418
2420
static private Application _appInstance ;
2419
2421
static private Assembly _resourceAssembly ;
2420
- static private object _packageLock = new Object ( ) ;
2421
2422
2422
2423
// Keep LoadBamlSyncInfo stack so that the Outer LoadBaml and Inner LoadBaml( ) for the same
2423
2424
// Uri share the related information.
You can’t perform that action at this time.
0 commit comments