Skip to content

Commit 69adb52

Browse files
author
Mike Kaufman
committed
updating thread verification asserts to only fire if we're actually collecting telemetry
1 parent 83238de commit 69adb52

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/Common/Memory/RecyclerTelemetryInfo.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ namespace Memory
3434

3535
RecyclerTelemetryInfo::~RecyclerTelemetryInfo()
3636
{
37-
AssertOnValidThread(this, RecyclerTelemetryInfo::~RecyclerTelemetryInfo);
3837
if (this->hostInterface != nullptr && this->passCount > 0)
3938
{
39+
AssertOnValidThread(this, RecyclerTelemetryInfo::~RecyclerTelemetryInfo);
4040
this->hostInterface->TransmitTelemetry(*this);
41+
this->FreeGCPassStats();
4142
}
42-
this->FreeGCPassStats();
4343
}
4444

4545
const GUID& RecyclerTelemetryInfo::GetRecyclerID() const
@@ -195,10 +195,9 @@ namespace Memory
195195

196196
void RecyclerTelemetryInfo::FreeGCPassStats()
197197
{
198-
AssertOnValidThread(this, RecyclerTelemetryInfo::FreeGCPassStats);
199-
200198
if (this->lastPassStats != nullptr)
201199
{
200+
AssertOnValidThread(this, RecyclerTelemetryInfo::FreeGCPassStats);
202201
RecyclerTelemetryGCPassStats* head = this->lastPassStats->next;
203202
RecyclerTelemetryGCPassStats* curr = head;
204203
#ifdef DBG

0 commit comments

Comments
 (0)