summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-08-18 15:20:24 -0500
committertrav90 <travawine@palemoon.org>2018-08-18 15:20:24 -0500
commit7099e9829b725b9184b317c4c14784b64b8fcf39 (patch)
treec355e03fcabafb70da4057db1a050b58444e0628 /js
parent450eed08c5eb7de7928e185feaf79f0b74b932e5 (diff)
downloadUXP-7099e9829b725b9184b317c4c14784b64b8fcf39.tar
UXP-7099e9829b725b9184b317c4c14784b64b8fcf39.tar.gz
UXP-7099e9829b725b9184b317c4c14784b64b8fcf39.tar.lz
UXP-7099e9829b725b9184b317c4c14784b64b8fcf39.tar.xz
UXP-7099e9829b725b9184b317c4c14784b64b8fcf39.zip
Avoid using memset on a not-trivial type like TabSizes
Diffstat (limited to 'js')
-rw-r--r--js/public/MemoryMetrics.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/js/public/MemoryMetrics.h b/js/public/MemoryMetrics.h
index 9b5caa24b..bbaecaec3 100644
--- a/js/public/MemoryMetrics.h
+++ b/js/public/MemoryMetrics.h
@@ -37,7 +37,13 @@ struct TabSizes
Other
};
- TabSizes() { mozilla::PodZero(this); }
+ TabSizes()
+ : objects(0)
+ , strings(0)
+ , private_(0)
+ , other(0)
+ {
+ }
void add(Kind kind, size_t n) {
switch (kind) {