diff --git a/src/OpenIddict.Abstractions/Primitives/OpenIddictParameter.cs b/src/OpenIddict.Abstractions/Primitives/OpenIddictParameter.cs index a482b9a5..2f741d24 100644 --- a/src/OpenIddict.Abstractions/Primitives/OpenIddictParameter.cs +++ b/src/OpenIddict.Abstractions/Primitives/OpenIddictParameter.cs @@ -7,6 +7,7 @@ using System.Collections.Immutable; using System.ComponentModel; using System.Globalization; +using System.Runtime.CompilerServices; using System.Text.Json; #if SUPPORTS_JSON_NODES @@ -252,6 +253,8 @@ public readonly struct OpenIddictParameter : IEquatable static bool DeepEquals(JsonElement left, JsonElement right) { + RuntimeHelpers.EnsureSufficientExecutionStack(); + switch ((left.ValueKind, right.ValueKind)) { case (JsonValueKind.Undefined, JsonValueKind.Undefined): @@ -383,6 +386,8 @@ public readonly struct OpenIddictParameter : IEquatable static int GetHashCodeFromJsonElement(JsonElement element) { + RuntimeHelpers.EnsureSufficientExecutionStack(); + switch (element.ValueKind) { case JsonValueKind.Undefined: