Bug 1384688 - Pass aIsShuttingDown == true when obtaining shutdown profiles. r?njn
MozReview-Commit-ID: Aw79gYQgkqy
--- a/tools/profiler/gecko/ProfilerChild.cpp
+++ b/tools/profiler/gecko/ProfilerChild.cpp
@@ -70,32 +70,33 @@ ProfilerChild::RecvPause()
mozilla::ipc::IPCResult
ProfilerChild::RecvResume()
{
profiler_resume();
return IPC_OK();
}
static nsCString
-CollectProfileOrEmptyString()
+CollectProfileOrEmptyString(bool aIsShuttingDown)
{
nsCString profileCString;
- UniquePtr<char[]> profile = profiler_get_profile();
+ UniquePtr<char[]> profile =
+ profiler_get_profile(/* aSinceTime */ 0, aIsShuttingDown);
if (profile) {
profileCString = nsCString(profile.get(), strlen(profile.get()));
} else {
profileCString = EmptyCString();
}
return profileCString;
}
mozilla::ipc::IPCResult
ProfilerChild::RecvGatherProfile(GatherProfileResolver&& aResolve)
{
- aResolve(CollectProfileOrEmptyString());
+ aResolve(CollectProfileOrEmptyString(/* aIsShuttingDown */ false));
return IPC_OK();
}
void
ProfilerChild::ActorDestroy(ActorDestroyReason aActorDestroyReason)
{
mDestroyed = true;
}
@@ -106,12 +107,12 @@ ProfilerChild::Destroy()
if (!mDestroyed) {
Close();
}
}
nsCString
ProfilerChild::GrabShutdownProfile()
{
- return CollectProfileOrEmptyString();
+ return CollectProfileOrEmptyString(/* aIsShuttingDown */ true);
}
} // namespace mozilla