Browse Source

Use RuntimeHelpers.EnsureSufficientExecutionStack() in OpenIddictParameter

pull/1419/head
Kévin Chalet 4 years ago
parent
commit
1fc1a3e12d
  1. 5
      src/OpenIddict.Abstractions/Primitives/OpenIddictParameter.cs

5
src/OpenIddict.Abstractions/Primitives/OpenIddictParameter.cs

@ -7,6 +7,7 @@
using System.Collections.Immutable; using System.Collections.Immutable;
using System.ComponentModel; using System.ComponentModel;
using System.Globalization; using System.Globalization;
using System.Runtime.CompilerServices;
using System.Text.Json; using System.Text.Json;
#if SUPPORTS_JSON_NODES #if SUPPORTS_JSON_NODES
@ -252,6 +253,8 @@ public readonly struct OpenIddictParameter : IEquatable<OpenIddictParameter>
static bool DeepEquals(JsonElement left, JsonElement right) static bool DeepEquals(JsonElement left, JsonElement right)
{ {
RuntimeHelpers.EnsureSufficientExecutionStack();
switch ((left.ValueKind, right.ValueKind)) switch ((left.ValueKind, right.ValueKind))
{ {
case (JsonValueKind.Undefined, JsonValueKind.Undefined): case (JsonValueKind.Undefined, JsonValueKind.Undefined):
@ -383,6 +386,8 @@ public readonly struct OpenIddictParameter : IEquatable<OpenIddictParameter>
static int GetHashCodeFromJsonElement(JsonElement element) static int GetHashCodeFromJsonElement(JsonElement element)
{ {
RuntimeHelpers.EnsureSufficientExecutionStack();
switch (element.ValueKind) switch (element.ValueKind)
{ {
case JsonValueKind.Undefined: case JsonValueKind.Undefined:

Loading…
Cancel
Save