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

Fix UWP GateKeeper errors #2415

Merged
merged 3 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Fix system frames being marked as "in-app" ([#2408](https://github.com/getsentry/sentry-dotnet/pull/2408))
- NOTE: This important fix corrects a value that is used during issue grouping, so you may receive new alerts for existing issues after deploying this update.
- Populate scope's Cookies property ([#2411](https://github.com/getsentry/sentry-dotnet/pull/2411))
- Fix UWP GateKeeper errors ([#2415](https://github.com/getsentry/sentry-dotnet/pull/2415))

### Dependencies

Expand Down
13 changes: 1 addition & 12 deletions src/Sentry/Internal/FastSerialization/GrowableArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ internal struct HashableGrowableArray<T> : IReadOnlyList<T>, IEquatable<Hashable
private int _hashCode = 0;
private bool _sealed = false;

public HashableGrowableArray()
{
_items = new GrowableArray<T>();
}

public HashableGrowableArray(int capacity)
{
_items = new GrowableArray<T>(capacity);
Expand Down Expand Up @@ -95,13 +90,7 @@ public bool Equals(HashableGrowableArray<T> other)
internal struct GrowableArray<T> : IReadOnlyList<T>
{
/// <summary>
/// Create an empty growable array.
/// </summary>
public GrowableArray() : this(0) { }

/// <summary>
/// Create a growable array with the given initial size it will grow as needed. There is also the
/// default constructor that assumes initialSize of 0 (and does not actually allocate the array.
/// Create a growable array with the given initial size it will grow as needed.
/// </summary>
/// <param name="initialSize"></param>
public GrowableArray(int initialSize)
Expand Down
8 changes: 1 addition & 7 deletions src/Sentry/Internal/SparseArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ internal sealed class SparseScalarArray<T> where T : IEquatable<T>
private GrowableArray<T> _items;
private T _uninitializedValue;

public SparseScalarArray(T uninitializedValue)
{
_items = new GrowableArray<T>();
_uninitializedValue = uninitializedValue;
}

public SparseScalarArray(T uninitializedValue, int capacity)
public SparseScalarArray(T uninitializedValue, int capacity = 0)
{
_items = new GrowableArray<T>(capacity);
_uninitializedValue = uninitializedValue;
Expand Down
2 changes: 1 addition & 1 deletion test/Sentry.Tests/Protocol/ProfilerTests.verify.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public ProfilerTests(ITestOutputHelper output)

private static void AddStack(SampleProfile sut, List<int> frames)
{
var stack = new HashableGrowableArray<int>();
var stack = new HashableGrowableArray<int>(0);
foreach (var frame in frames)
{
stack.Add(frame);
Expand Down