diff --git a/tools/profiler/core/ProfileBufferEntry.cpp b/tools/profiler/core/ProfileBufferEntry.cpp index c6ae6e6e4625..6f4aae91e70d 100644 --- a/tools/profiler/core/ProfileBufferEntry.cpp +++ b/tools/profiler/core/ProfileBufferEntry.cpp @@ -1445,7 +1445,9 @@ void ProfileBuffer::StreamMarkersToJSON(SpliceableJSONWriter& aWriter, mozilla::base_profiler_markers_detail::DeserializeAfterKindAndStream( aER, [&](const ProfilerThreadId& aMarkerThreadId) { - return (aMarkerThreadId == aThreadId) ? &aWriter : nullptr; + return (!aThreadId.IsSpecified() || aMarkerThreadId == aThreadId) + ? &aWriter + : nullptr; }, [&](ProfileChunkedBuffer& aChunkedBuffer) { ProfilerBacktrace backtrace("", &aChunkedBuffer);