Bug 735916 - Fix javascript.options.mem.log (r=terrence)

This commit is contained in:
Bill McCloskey 2012-03-14 16:50:35 -07:00
parent e54841f6d9
commit c34cd398f5

View File

@ -3496,12 +3496,12 @@ DOMGCSliceCallback(JSRuntime *aRt, js::GCProgress aProgress, const js::GCDescrip
sFirstCollectionTime = now; sFirstCollectionTime = now;
} }
NS_NAMED_LITERAL_STRING(kFmt, "GC(T+%.1f) %s"); NS_NAMED_LITERAL_STRING(kFmt, "GC(T+%.1f) ");
nsString msg, gcstats; nsString prefix, gcstats;
gcstats.Adopt(aDesc.formatMessage(aRt)); gcstats.Adopt(aDesc.formatMessage(aRt));
msg.Adopt(nsTextFormatter::smprintf(kFmt.get(), prefix.Adopt(nsTextFormatter::smprintf(kFmt.get(),
double(delta) / PR_USEC_PER_SEC, double(delta) / PR_USEC_PER_SEC));
gcstats.get())); nsString msg = prefix + gcstats;
nsCOMPtr<nsIConsoleService> cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID); nsCOMPtr<nsIConsoleService> cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID);
if (cs) { if (cs) {
cs->LogStringMessage(msg.get()); cs->LogStringMessage(msg.get());