mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 822700 - When DMD is disabled its SizeOf() function shouldn't try to measure non-existent structures. r=jlebar.
--HG-- extra : rebase_source : 21066e5173dbc7e4a6c7615f1b355989bf046082
This commit is contained in:
parent
23a8027808
commit
023fca81d9
@ -1973,6 +1973,11 @@ PrintSortedBlockAndFrameGroups(const Writer& aWriter,
|
||||
MOZ_EXPORT void
|
||||
SizeOf(Sizes* aSizes)
|
||||
{
|
||||
if (!gIsDMDRunning) {
|
||||
aSizes->Clear();
|
||||
return;
|
||||
}
|
||||
|
||||
aSizes->mStackTraces = 0;
|
||||
for (StackTraceTable::Range r = gStackTraceTable->all();
|
||||
!r.empty();
|
||||
|
@ -57,7 +57,8 @@ struct Sizes
|
||||
size_t mLiveBlockTable;
|
||||
size_t mDoubleReportTable;
|
||||
|
||||
Sizes() { memset(this, 0, sizeof(Sizes)); }
|
||||
Sizes() { Clear(); }
|
||||
void Clear() { memset(this, 0, sizeof(Sizes)); }
|
||||
};
|
||||
|
||||
// Gets the size of various data structures. Used to implement a memory
|
||||
|
Loading…
Reference in New Issue
Block a user