From 67062893af45f36d9b4ed1d0a46dca64aa427f7c Mon Sep 17 00:00:00 2001 From: Charles Stoner <10732005+cston@users.noreply.github.com> Date: Fri, 12 Aug 2022 20:34:14 -0700 Subject: [PATCH 1/2] Add scoped --- .../Runtime.Base/src/System/Runtime/ExceptionHandling.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs index 9e576853a44cb..81242191d1aab 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs @@ -588,7 +588,7 @@ public static void RhRethrow(ref ExInfo activeExInfo, ref ExInfo exInfo) FallbackFailFast(RhFailFastReason.InternalError, null); } - private static void DispatchEx(ref StackFrameIterator frameIter, ref ExInfo exInfo, uint startIdx) + private static void DispatchEx(scoped ref StackFrameIterator frameIter, ref ExInfo exInfo, uint startIdx) { Debug.Assert(exInfo._passNumber == 1, "expected asm throw routine to set the pass"); object exceptionObj = exInfo.ThrownException; From 86f07e350629aacf17db6b3f539eca214579a479 Mon Sep 17 00:00:00 2001 From: Charles Stoner <10732005+cston@users.noreply.github.com> Date: Fri, 12 Aug 2022 20:49:01 -0700 Subject: [PATCH 2/2] More scoped --- .../tests/System.Text.Json.Tests/JsonDocumentTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonDocumentTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonDocumentTests.cs index 45590069c094f..cc3d827ca729f 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonDocumentTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonDocumentTests.cs @@ -3611,7 +3611,7 @@ private static void BuildSegmentedReader( out Utf8JsonReader reader, ReadOnlyMemory data, int segmentCount, - in JsonReaderState state, + scoped in JsonReaderState state, bool isFinalBlock = false) { if (segmentCount == 0)