Bug 973899: Fix usage of temporary string that was causing crashes; r=ehsan

This commit is contained in:
Aaron Klotz 2014-02-18 10:13:51 -07:00
parent 3acd1f0e68
commit e725986f91

View File

@ -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);
}