Closed Bug 781133 Opened 12 years ago Closed 12 years ago

Fix locale specific numbers in hung plugin CPU usage reporting

Categories

(Core Graveyard :: Plug-ins, defect)

17 Branch
All
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla17

People

(Reporter: gfritzsche, Assigned: gfritzsche)

References

Details

Attachments

(1 file, 2 obsolete files)

      No description provided.
Avoid writing locale specific numbers for the plugin CPU usage report.
Stop fixing locale specific numbers in the associated test.
Attachment #650117 - Flags: review?(benjamin)
Comment on attachment 650117 [details] [diff] [review]
Fix locale specific CPU usage numbers

I'm surprised that nsPrintfCString was locale-dependent (and that this function would be different). But if this works, let's do it!
Attachment #650117 - Flags: review?(benjamin) → review+
Keywords: checkin-needed
(In reply to Benjamin Smedberg  [:bsmedberg] [away 27-July until 7-Aug] from comment #2)
> I'm surprised that nsPrintfCString was locale-dependent (and that this
> function would be different). But if this works, let's do it!

Apparently nsPrintfCString behaves like printf() locale-wise, while PR_cnvtf() behaves like specified for ECMA script.
Backed out yet again in https://hg.mozilla.org/integration/mozilla-inbound/rev/beb7a4c0d06f

https://tbpl.mozilla.org/php/getParsedLog.php?id=14247588&tree=Mozilla-Inbound
4453 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/plugins/test/test_busy_hang.xul | got extra field for plugin cpu usage
4454 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/plugins/test/test_busy_hang.xul | plugin cpu usage is >0%
Use nsCString::AppendFloat() to avoid local buffer management, round manually.

Try: https://tbpl.mozilla.org/?tree=Try&rev=7b06c9be10a3
Attachment #650117 - Attachment is obsolete: true
Comment on attachment 650475 [details] [diff] [review]
Fix locale specific CPU usage numbers

Try build results are fine. Benjamin, can you do a follow review?
Attachment #650475 - Flags: review?(benjamin)
Comment on attachment 650475 [details] [diff] [review]
Fix locale specific CPU usage numbers

Why std::ceilf instead of ceilf? I'm not sure it matters either way, though.
Attachment #650475 - Flags: review?(benjamin) → review+
From IRC discussion, this should either be ::ceilf or std::ceil, since std::ceilf is apparently a Windows-only weirdism.
Fixed std::ceilf() oversight.
Attachment #650475 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6cfd16fe1cb3
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: