зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1521191, part 3 - Add a function to create a negative leak. r=froydnj
This is needed to test the test harness's handling of a negative leak being reported by the XPCOM leak checker. Depends on D17535 Differential Revision: https://phabricator.services.mozilla.com/D17536 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
16351e63ce
Коммит
5c1bc6074f
|
@ -329,6 +329,12 @@ interface nsIXPCComponents_Utils : nsISupports
|
|||
*/
|
||||
void intentionallyLeak();
|
||||
|
||||
/*
|
||||
* In a debug build, cause the XPCOM leak checker to report a negative leak.
|
||||
* This is needed to test leak checking.
|
||||
*/
|
||||
void intentionallyLeakNegatively();
|
||||
|
||||
/*
|
||||
* In a debug build, make XPCOM not print out a bloat log in this process.
|
||||
* This is needed to test leak checking.
|
||||
|
|
|
@ -1758,6 +1758,16 @@ nsXPCComponents_Utils::IntentionallyLeak() {
|
|||
#endif
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXPCComponents_Utils::IntentionallyLeakNegatively() {
|
||||
#ifdef DEBUG
|
||||
MOZ_COUNT_DTOR(IntentionallyLeakedObject);
|
||||
return NS_OK;
|
||||
#else
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXPCComponents_Utils::DisableDumpStatistics() {
|
||||
#ifdef DEBUG
|
||||
|
|
Загрузка…
Ссылка в новой задаче