summaryrefslogtreecommitdiff
path: root/js/public
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/public
parent7099e9829b725b9184b317c4c14784b64b8fcf39 (diff)
downloaduxp-b5e87d0644f634240bf3c67cca505f91f271cfa9.tar.gz
Avoid using memset on a not-trivial type like ServoSizes
Diffstat (limited to 'js/public')
-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 bbaecaec3a..b0b26631c6 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) {