From 766c8e3ffd0bf9f85e0ddee02636d107b1e4288c Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 11 Feb 2022 13:06:02 +0000 Subject: [PATCH] [DOM] Lock around memory reporting for XHR --- dom/xhr/XMLHttpRequestString.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dom/xhr/XMLHttpRequestString.h b/dom/xhr/XMLHttpRequestString.h index b02040b7ea..4a87aa4d8a 100644 --- a/dom/xhr/XMLHttpRequestString.h +++ b/dom/xhr/XMLHttpRequestString.h @@ -201,8 +201,9 @@ public: } size_t - SizeOfThis(MallocSizeOf aMallocSizeOf) const + SizeOfThis(MallocSizeOf aMallocSizeOf) { + MutexAutoLock lock(mMutex); return mData.SizeOfExcludingThisIfUnshared(aMallocSizeOf); }