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.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<OpenIddictParameter>
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<OpenIddictParameter>
static int GetHashCodeFromJsonElement(JsonElement element)
{
RuntimeHelpers.EnsureSufficientExecutionStack();
switch (element.ValueKind)
{
case JsonValueKind.Undefined:

Loading…
Cancel
Save