Skip to content

Commit

Permalink
Return capabilities if hot reload component is available, even if env…
Browse files Browse the repository at this point in the history
… var isn't set.

Match CoreCLR behavior.  Also makes our testsuite actually run the
tests (we check for capabilities before running setting
DOTNET_MODIFIABLE_ASSEMBLIES using the remote executor)
  • Loading branch information
lambdageek committed Jun 12, 2021
1 parent a1a11b5 commit 1b90e05
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/icall.c
Original file line number Diff line number Diff line change
Expand Up @@ -5757,7 +5757,7 @@ ves_icall_AssemblyExtensions_ApplyUpdate (MonoAssembly *assm,

gint32 ves_icall_AssemblyExtensions_ApplyUpdateEnabled (void)
{
return mono_metadata_update_enabled (NULL) ? 1 : 0;
return mono_metadata_update_available ();
}
#endif

Expand Down
6 changes: 6 additions & 0 deletions src/mono/mono/metadata/metadata-update.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
#include "mono/metadata/components.h"
#include "mono/component/hot_reload.h"

gboolean
mono_metadata_update_available (void)
{
return mono_component_hot_reload ()->component.available ();
}

#ifdef ENABLE_METADATA_UPDATE

MonoMetadataUpdateData mono_metadata_update_data_private;
Expand Down
3 changes: 3 additions & 0 deletions src/mono/mono/metadata/metadata-update.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ enum MonoModifiableAssemblies {

typedef MonoStreamHeader* (*MetadataHeapGetterFunc) (MonoImage*);

gboolean
mono_metadata_update_available (void);

#ifdef ENABLE_METADATA_UPDATE

gboolean
Expand Down

0 comments on commit 1b90e05

Please sign in to comment.