Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/5.0-preview3] Cache parameterized ctor delegates in class info rather than converter #34353

Merged
merged 1 commit into from
Apr 3, 2020

Conversation

layomia
Copy link
Contributor

@layomia layomia commented Apr 1, 2020

Description

Ports #34248 to preview 3.
Fixes #33928 in preview 3.

A JsonSerializer feature that enables the deserialization of POCOs using parameterized ctors was recently checked in - #33444.

CI caught an issue where JsonSerializer leaks a null ref in some cases where deserialization of objects using parameterized ctors is occurring on multiple threads: #33928. This PR fixes the issue.

Customer Impact

Prevents a null ref in multi-threaded deserialization scenarios. Users are likely to hit this when deserializing objects using parameterized ctors on mutliple threads. This proactively fixes the issue.

Regression?

This feature is shipping for the first time in this preview.

Risk

Tests have been added for this scenario.

dotnet#34248)

* Cache parameterized ctor delegates in class info rather than converter

* Address review feedback - move delegate assignment to start of deserialization

* Address review feedback - nullability
@layomia layomia added bug Servicing-consider Issue for next servicing release review area-System.Text.Json labels Apr 1, 2020
@layomia layomia added this to the 5.0 milestone Apr 1, 2020
@layomia layomia requested a review from ahsonkhan as a code owner April 1, 2020 02:07
@layomia layomia self-assigned this Apr 1, 2020
@ericstj ericstj added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Apr 3, 2020
@Anipik Anipik merged commit 8f6b899 into dotnet:release/5.0-preview3 Apr 3, 2020
@layomia layomia deleted the ctors branch April 5, 2020 05:39
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants