2014-05-05 21:30:39 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2017-10-15 18:30:57 +03:00
|
|
|
#ifndef nsTraceRefcnt_h
|
|
|
|
#define nsTraceRefcnt_h
|
1998-10-19 21:48:55 +04:00
|
|
|
|
2003-12-13 02:02:12 +03:00
|
|
|
#include <stdio.h> // for FILE
|
2014-02-25 03:27:53 +04:00
|
|
|
#include "nscore.h"
|
1999-10-05 03:36:18 +04:00
|
|
|
|
2014-02-27 01:36:36 +04:00
|
|
|
class nsTraceRefcnt {
|
1999-10-09 00:29:47 +04:00
|
|
|
public:
|
2011-08-18 17:46:39 +04:00
|
|
|
static void Shutdown();
|
2000-06-15 06:23:55 +04:00
|
|
|
|
2016-10-10 20:56:09 +03:00
|
|
|
static nsresult DumpStatistics();
|
2008-08-04 01:39:04 +04:00
|
|
|
|
2014-05-13 21:41:38 +04:00
|
|
|
static void ResetStatistics();
|
1999-10-09 00:29:47 +04:00
|
|
|
|
2011-08-18 17:46:39 +04:00
|
|
|
static void WalkTheStack(FILE* aStream);
|
2014-08-01 20:27:35 +04:00
|
|
|
|
2000-12-23 19:43:32 +03:00
|
|
|
/**
|
|
|
|
* Tell nsTraceRefcnt whether refcounting, allocation, and destruction
|
|
|
|
* activity is legal. This is used to trigger assertions for any such
|
|
|
|
* activity that occurs because of static constructors or destructors.
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
static void SetActivityIsLegal(bool aLegal);
|
1999-10-09 00:29:47 +04:00
|
|
|
};
|
1999-10-08 01:50:20 +04:00
|
|
|
|
2017-10-15 18:30:57 +03:00
|
|
|
#endif // nsTraceRefcnt_h
|