1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsTraceRefcnt_h
7 #define nsTraceRefcnt_h
8 
9 #include "nscore.h"
10 
11 class nsTraceRefcnt {
12  public:
13   static void Shutdown();
14 
15   static nsresult DumpStatistics();
16 
17   static void ResetStatistics();
18 
19   /**
20    * Tell nsTraceRefcnt whether refcounting, allocation, and destruction
21    * activity is legal.  This is used to trigger assertions for any such
22    * activity that occurs because of static constructors or destructors.
23    */
24   static void SetActivityIsLegal(bool aLegal);
25 
26 #ifdef MOZ_ENABLE_FORKSERVER
27   static void ResetLogFiles(const char* aProcType = nullptr);
28 #endif
29 };
30 
31 #endif  // nsTraceRefcnt_h
32