mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1000621 - Check if DMD is enabled before dumping. r=njn. DONTBUILD
This commit is contained in:
parent
68cd3b0f84
commit
1058655d11
@ -2095,6 +2095,12 @@ ClearReports()
|
||||
ClearReportsInternal();
|
||||
}
|
||||
|
||||
MOZ_EXPORT bool
|
||||
IsEnabled()
|
||||
{
|
||||
return gIsDMDRunning;
|
||||
}
|
||||
|
||||
MOZ_EXPORT void
|
||||
Dump(Writer aWriter)
|
||||
{
|
||||
|
@ -78,6 +78,10 @@ struct Sizes
|
||||
MOZ_EXPORT void
|
||||
SizeOf(Sizes* aSizes);
|
||||
|
||||
// Indicates whether or not DMD is enabled.
|
||||
MOZ_EXPORT bool
|
||||
IsEnabled();
|
||||
|
||||
} // namespace mozilla
|
||||
} // namespace dmd
|
||||
|
||||
|
@ -516,6 +516,10 @@ nsMemoryInfoDumper::DumpMemoryInfoToTempDir(const nsAString& aIdentifier,
|
||||
nsresult
|
||||
nsMemoryInfoDumper::DumpDMD(const nsAString &aIdentifier)
|
||||
{
|
||||
if (!dmd::IsEnabled()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
|
||||
// Create a filename like dmd-<identifier>-<pid>.txt.gz, which will be used
|
||||
|
Loading…
Reference in New Issue
Block a user