summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-08-18 15:22:21 -0500
committertrav90 <travawine@palemoon.org>2018-08-18 15:22:21 -0500
commitb5e87d0644f634240bf3c67cca505f91f271cfa9 (patch)
treed4a158e6882f80a6695ebdb90769fa7697cfaf8e /js
parent7099e9829b725b9184b317c4c14784b64b8fcf39 (diff)
downloadUXP-b5e87d0644f634240bf3c67cca505f91f271cfa9.tar
UXP-b5e87d0644f634240bf3c67cca505f91f271cfa9.tar.gz
UXP-b5e87d0644f634240bf3c67cca505f91f271cfa9.tar.lz
UXP-b5e87d0644f634240bf3c67cca505f91f271cfa9.tar.xz
UXP-b5e87d0644f634240bf3c67cca505f91f271cfa9.zip
Avoid using memset on a not-trivial type like ServoSizes
Diffstat (limited to 'js')
-rw-r--r--js/public/MemoryMetrics.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/js/public/MemoryMetrics.h b/js/public/MemoryMetrics.h
index bbaecaec3..b0b26631c 100644
--- a/js/public/MemoryMetrics.h
+++ b/js/public/MemoryMetrics.h
@@ -74,7 +74,15 @@ struct ServoSizes
Ignore
};
- ServoSizes() { mozilla::PodZero(this); }
+ ServoSizes()
+ : gcHeapUsed(0)
+ , gcHeapUnused(0)
+ , gcHeapAdmin(0)
+ , gcHeapDecommitted(0)
+ , mallocHeap(0)
+ , nonHeap(0)
+ {
+ }
void add(Kind kind, size_t n) {
switch (kind) {