diff --git a/tools/profiler/ProfilerIOInterposeObserver.cpp b/tools/profiler/ProfilerIOInterposeObserver.cpp index a0f6a074253..e77b29b921b 100644 --- a/tools/profiler/ProfilerIOInterposeObserver.cpp +++ b/tools/profiler/ProfilerIOInterposeObserver.cpp @@ -36,12 +36,11 @@ void ProfilerIOInterposeObserver::Observe(Observation& aObservation) } ProfilerBacktrace* stack = profiler_get_backtrace(); - const char *filename = (NS_ConvertUTF16toUTF8(aObservation.Filename())).get(); - - IOMarkerPayload* markerPayload = new IOMarkerPayload(aObservation.Reference(), - filename, - aObservation.Start(), - aObservation.End(), - stack); + IOMarkerPayload* markerPayload = new IOMarkerPayload( + aObservation.Reference(), + NS_ConvertUTF16toUTF8(aObservation.Filename()).get(), + aObservation.Start(), + aObservation.End(), + stack); PROFILER_MARKER_PAYLOAD(str, markerPayload); }