Skip to content

Commit c895d95

Browse files
authored
[mono] Pass the pending exception correctly from interp_runtime_invoke (). (#72126)
Fixes #71838.
1 parent f7d7b55 commit c895d95

File tree

11 files changed

+3
-32
lines changed

11 files changed

+3
-32
lines changed

src/libraries/System.Text.Json/tests/Common/CollectionTests/CollectionTests.KeyValuePair.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,6 @@ private class TrailingAngleBracketPolicy : JsonNamingPolicy
396396
[Theory]
397397
[InlineData(typeof(KeyNameNullPolicy), "Key")]
398398
[InlineData(typeof(ValueNameNullPolicy), "Value")]
399-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
400399
public async Task InvalidPropertyNameFail(Type policyType, string offendingProperty)
401400
{
402401
var options = new JsonSerializerOptions

src/libraries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.AttributePresence.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ public async Task PublicParameterlessCtor_MultiplePublicParameterizedCtors_WithA
115115

116116
#if !BUILDING_SOURCE_GENERATOR_TESTS // These are compile-time warnings from the source generator.
117117
[Fact]
118-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
119118
public async Task MultipleAttributes_NotSupported()
120119
{
121120
async Task RunTestAsync<T>()

src/libraries/System.Text.Json/tests/Common/ConstructorTests/ConstructorTests.Exceptions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ public async Task CaseInsensitiveFails()
317317
#if BUILDING_SOURCE_GENERATOR_TESTS
318318
[ActiveIssue("Multi-dim arrays not supported.")]
319319
#endif
320-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
321320
public async Task ClassWithUnsupportedCollectionTypes()
322321
{
323322
Exception e;

src/libraries/System.Text.Json/tests/Common/ExtensionDataTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ public class ClassWithTwoExtensionProperties
324324
#if BUILDING_SOURCE_GENERATOR_TESTS
325325
[ActiveIssue("https://github.com/dotnet/runtime/issues/58945")]
326326
#endif
327-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
328327
public async Task InvalidExtensionPropertyFail()
329328
{
330329
// Baseline
@@ -799,7 +798,7 @@ public async Task DeserializeIntoJsonObjectProperty()
799798
#if BUILDING_SOURCE_GENERATOR_TESTS
800799
[ActiveIssue("https://github.com/dotnet/runtime/issues/58945")]
801800
#endif
802-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
801+
803802
public async Task DeserializeIntoSystemObjectProperty()
804803
{
805804
string json = @"{""MyDict"":{""Property1"":1}}";
@@ -1089,7 +1088,6 @@ public class ClassWithInvalidExtensionPropertyStringJsonNode
10891088
#if BUILDING_SOURCE_GENERATOR_TESTS
10901089
[ActiveIssue("https://github.com/dotnet/runtime/issues/58945")]
10911090
#endif
1092-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
10931091
public async Task ExtensionProperty_InvalidDictionary()
10941092
{
10951093
var obj1 = new ClassWithInvalidExtensionPropertyStringString();
@@ -1149,7 +1147,6 @@ public class ClassWithMultipleDictionaries
11491147
#if BUILDING_SOURCE_GENERATOR_TESTS
11501148
[ActiveIssue("https://github.com/dotnet/runtime/issues/58945")]
11511149
#endif
1152-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
11531150
public async Task DeserializeIntoImmutableDictionaryProperty()
11541151
{
11551152
// baseline

src/libraries/System.Text.Json/tests/Common/PropertyNameTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public async Task CustomNamePolicy()
6464
}
6565

6666
[Fact]
67-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
6867
public async Task NullNamePolicy()
6968
{
7069
var options = new JsonSerializerOptions();
@@ -128,7 +127,6 @@ public async Task JsonPropertyNameAttribute()
128127
}
129128

130129
[Fact]
131-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
132130
public async Task JsonNameAttributeDuplicateDesignTimeFail()
133131
{
134132
{
@@ -143,7 +141,6 @@ public async Task JsonNameAttributeDuplicateDesignTimeFail()
143141
}
144142

145143
[Fact]
146-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
147144
public async Task JsonNameConflictOnCamelCasingFail()
148145
{
149146
{

src/libraries/System.Text.Json/tests/Common/PropertyVisibilityTests.NonPublicAccessors.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ public class ClassWithMixedPropertyAccessors_PropertyAttributes
325325
[InlineData(typeof(ClassWithPrivate_InitOnlyProperty_WithJsonIncludeProperty))]
326326
[InlineData(typeof(ClassWithInternal_InitOnlyProperty_WithJsonIncludeProperty))]
327327
[InlineData(typeof(ClassWithProtected_InitOnlyProperty_WithJsonIncludeProperty))]
328-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
329328
public virtual async Task NonPublicProperty_WithJsonInclude_Invalid(Type type)
330329
{
331330
InvalidOperationException ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await Serializer.DeserializeWrapper("{}", type));

src/libraries/System.Text.Json/tests/Common/PropertyVisibilityTests.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ public async Task Ignore_PublicProperty_ConflictWithPublicDuePolicy()
339339
}
340340

341341
[Fact]
342-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
343342
public async Task Throw_PublicProperty_ConflictDueAttributes()
344343
{
345344
// Serialize
@@ -354,7 +353,6 @@ await Assert.ThrowsAsync<InvalidOperationException>(
354353
}
355354

356355
[Fact]
357-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
358356
public async Task Throw_PublicPropertyAndField_ConflictDueAttributes()
359357
{
360358
// Serialize
@@ -369,7 +367,6 @@ await Assert.ThrowsAsync<InvalidOperationException>(
369367
}
370368

371369
[Fact]
372-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
373370
public async Task Throw_PublicProperty_ConflictDueAttributes_SingleInheritance()
374371
{
375372
// Serialize
@@ -393,7 +390,6 @@ await Assert.ThrowsAsync<InvalidOperationException>(
393390
}
394391

395392
[Fact]
396-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
397393
public async Task Throw_PublicPropertyAndField_ConflictDueAttributes_SingleInheritance()
398394
{
399395
// Serialize
@@ -417,7 +413,6 @@ await Assert.ThrowsAsync<InvalidOperationException>(
417413
}
418414

419415
[Fact]
420-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
421416
public async Task Throw_PublicProperty_ConflictDueAttributes_DoubleInheritance()
422417
{
423418
// Serialize
@@ -442,7 +437,6 @@ await Assert.ThrowsAsync<InvalidOperationException>(
442437
}
443438

444439
[Fact]
445-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
446440
public async Task Throw_PublicPropertyAndField_ConflictDueAttributes_DoubleInheritance()
447441
{
448442
// Serialize
@@ -467,7 +461,6 @@ await Assert.ThrowsAsync<InvalidOperationException>(
467461
}
468462

469463
[Fact]
470-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
471464
public async Task Throw_PublicProperty_ConflictDuePolicy()
472465
{
473466
var options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
@@ -484,7 +477,6 @@ await Assert.ThrowsAsync<InvalidOperationException>(
484477
}
485478

486479
[Fact]
487-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
488480
public async Task Throw_PublicPropertyAndField_ConflictDuePolicy()
489481
{
490482
var options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
@@ -501,7 +493,6 @@ await Assert.ThrowsAsync<InvalidOperationException>(
501493
}
502494

503495
[Fact]
504-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
505496
public async Task Throw_PublicProperty_ConflictDuePolicy_SingleInheritance()
506497
{
507498
var options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
@@ -528,7 +519,6 @@ await Assert.ThrowsAsync<InvalidOperationException>(
528519
}
529520

530521
[Fact]
531-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
532522
public async Task Throw_PublicPropertyAndField_ConflictDuePolicy_SingleInheritance()
533523
{
534524
var options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
@@ -555,7 +545,6 @@ await Assert.ThrowsAsync<InvalidOperationException>(
555545
}
556546

557547
[Fact]
558-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
559548
public async Task Throw_PublicProperty_ConflictDuePolicy_DobuleInheritance()
560549
{
561550
var options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
@@ -583,7 +572,6 @@ await Assert.ThrowsAsync<InvalidOperationException>(
583572
}
584573

585574
[Fact]
586-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
587575
public async Task Throw_PublicPropertyAndField_ConflictDuePolicy_DobuleInheritance()
588576
{
589577
var options = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
@@ -1150,7 +1138,6 @@ public async Task JsonIgnoreAttribute()
11501138
// Needs support for more collections.
11511139
[ActiveIssue("https://github.com/dotnet/runtime/issues/53393")]
11521140
#endif
1153-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71981")]
11541141
public async Task JsonIgnoreAttribute_UnsupportedCollection()
11551142
{
11561143
string json =
@@ -2426,7 +2413,6 @@ public class ClassWithThingsToIgnore_PerProperty
24262413
[Theory]
24272414
[InlineData(typeof(ClassWithBadIgnoreAttribute))]
24282415
[InlineData(typeof(StructWithBadIgnoreAttribute))]
2429-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
24302416
public virtual async Task JsonIgnoreCondition_WhenWritingNull_OnValueType_Fail(Type type)
24312417
{
24322418
InvalidOperationException ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await Serializer.DeserializeWrapper("{}", type));
@@ -2447,7 +2433,6 @@ public virtual async Task JsonIgnoreCondition_WhenWritingNull_OnValueType_Fail(T
24472433
[Theory]
24482434
[InlineData(typeof(ClassWithBadIgnoreAttribute))]
24492435
[InlineData(typeof(StructWithBadIgnoreAttribute))]
2450-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
24512436
public virtual async Task JsonIgnoreCondition_WhenWritingNull_OnValueType_Fail_EmptyJson(Type type)
24522437
{
24532438
InvalidOperationException ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await Serializer.DeserializeWrapper("", type));
@@ -2760,7 +2745,6 @@ public async Task JsonIgnoreCondition_Polymorphic()
27602745
}
27612746

27622747
[Fact]
2763-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
27642748
public async Task SerializationMetadataNotComputedWhenMemberIgnored()
27652749
{
27662750
string janePayload = @"{""Name"":""Jane Doe""}";

src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/Serialization/PropertyVisibilityTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ public PropertyVisibilityTests_Default()
300300
[InlineData(typeof(ClassWithPrivate_InitOnlyProperty_WithJsonIncludeProperty))]
301301
[InlineData(typeof(ClassWithInternal_InitOnlyProperty_WithJsonIncludeProperty))]
302302
[InlineData(typeof(ClassWithProtected_InitOnlyProperty_WithJsonIncludeProperty))]
303-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
304303
public override async Task NonPublicProperty_WithJsonInclude_Invalid(Type type)
305304
{
306305
// Exception messages direct users to use JsonSourceGenerationMode.Metadata to see a more detailed error.

src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/InvalidTypeTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public void DeserializeInvalidType(Type type)
5858

5959
[Theory]
6060
[MemberData(nameof(TypesWithInvalidMembers_WithMembers))]
61-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
6261
public async Task TypeWithInvalidMember(Type classType, Type invalidMemberType, string invalidMemberName)
6362
{
6463
static void ValidateException(InvalidOperationException ex, Type classType, Type invalidMemberType, string invalidMemberName)

src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/PropertyNameTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public async Task JsonNullNameAttribute()
2222
}
2323

2424
[Fact]
25-
[ActiveIssue("https://github.com/dotnet/runtime/issues/71838", typeof(PlatformDetection), nameof(PlatformDetection.IsBrowser), nameof(PlatformDetection.IsMonoAOT))]
2625
public async Task JsonNameConflictOnCaseInsensitiveFail()
2726
{
2827
string json = @"{""myInt"":1,""MyInt"":2}";

0 commit comments

Comments
 (0)