Bug 1353349 - Don't attempt to put empty profiles into the processes array. r?froydnj
MozReview-Commit-ID: HFjLEaqippx
--- a/tools/profiler/gecko/ProfileGatherer.cpp
+++ b/tools/profiler/gecko/ProfileGatherer.cpp
@@ -42,17 +42,19 @@ ProfileGatherer::GatheredOOPProfile(cons
// If we're not actively gathering, then we don't actually
// care that we gathered a profile here. This can happen for
// processes that exit while profiling.
return;
}
MOZ_RELEASE_ASSERT(mWriter.isSome(), "Should always have a writer if mGathering is true");
- mWriter->Splice(PromiseFlatCString(aProfile).get());
+ if (!aProfile.IsEmpty()) {
+ mWriter->Splice(PromiseFlatCString(aProfile).get());
+ }
mPendingProfiles--;
if (mPendingProfiles == 0) {
// We've got all of the async profiles now. Let's
// finish off the profile and resolve the Promise.
Finish();
}