Bug 781133 - Fix locale specific numbers in hung plugin CPU usage reporting. r=bsmedberg
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "nsPrintfCString.h"
|
||||
|
||||
#include "prsystem.h"
|
||||
#include "prdtoa.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include "mozilla/widget/AudioSession.h"
|
||||
@@ -179,8 +180,10 @@ PluginModuleParent::WriteExtraDataForMinidump(AnnotationTable& notes)
|
||||
notes.Put(CS("HangID"), NS_ConvertUTF16toUTF8(hangID));
|
||||
#ifdef XP_WIN
|
||||
if (mPluginCpuUsageOnHang >= 0) {
|
||||
notes.Put(CS("PluginCpuUsage"),
|
||||
nsPrintfCString("%.2f", mPluginCpuUsageOnHang));
|
||||
char buf[7];
|
||||
PR_cnvtf(buf, NS_ARRAY_LENGTH(buf), 2, mPluginCpuUsageOnHang);
|
||||
notes.Put(CS("PluginCpuUsage"), CS(buf));
|
||||
|
||||
notes.Put(CS("NumberOfProcessors"),
|
||||
nsPrintfCString("%d", PR_GetNumberOfProcessors()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user