Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/coreclr/vm/assemblybinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ NativeImage* AssemblyBinder::LoadNativeImage(Module* componentModule, LPCUTF8 na
AppDomain::LoadLockHolder lock(AppDomain::GetCurrentDomain());
PTR_LoaderAllocator moduleLoaderAllocator = componentModule->GetLoaderAllocator();

bool isNewNativeImage;
NativeImage* nativeImage = NativeImage::Open(componentModule->GetPath(), nativeImageName, this, moduleLoaderAllocator, isPlatformNative, &isNewNativeImage);
NativeImage* nativeImage = NativeImage::Open(componentModule->GetPath(), nativeImageName, this, moduleLoaderAllocator, isPlatformNative);

return nativeImage;
}
Expand Down
6 changes: 1 addition & 5 deletions src/coreclr/vm/nativeimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,13 @@ NativeImage *NativeImage::Open(
LPCUTF8 nativeImageFileName,
AssemblyBinder *pAssemblyBinder,
LoaderAllocator *pLoaderAllocator,
bool isPlatformNative,
/* out */ bool *isNewNativeImage)
bool isPlatformNative)
{
STANDARD_VM_CONTRACT;

NativeImage *pExistingImage = AppDomain::GetCurrentDomain()->GetNativeImage(nativeImageFileName);
if (pExistingImage != nullptr)
{
*isNewNativeImage = false;
if (pExistingImage->GetAssemblyBinder() == pAssemblyBinder)
{
return pExistingImage;
Expand Down Expand Up @@ -292,12 +290,10 @@ NativeImage *NativeImage::Open(
if (pExistingImage == nullptr)
{
// No pre-existing image, new image has been stored in the map
*isNewNativeImage = true;
amTracker.SuppressRelease();
return image.Extract();
}
// Return pre-existing image if it was loaded into the same ALC, null otherwise
*isNewNativeImage = false;
if (pExistingImage->GetAssemblyBinder() == pAssemblyBinder)
{
return pExistingImage;
Expand Down
3 changes: 1 addition & 2 deletions src/coreclr/vm/nativeimage.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ class NativeImage
LPCUTF8 nativeImageFileName,
AssemblyBinder *pAssemblyBinder,
LoaderAllocator *pLoaderAllocator,
bool isPlatformNative,
/* out */ bool *isNewNativeImage);
bool isPlatformNative);

Crst *EagerFixupsLock() { return &m_eagerFixupsLock; }
bool EagerFixupsHaveRun() const { return m_eagerFixupsHaveRun; }
Expand Down
Loading