Summary: | Avoid strlen() when converting DTOA result to String | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Patrick R. Gansterer <paroga> | ||||
Component: | Web Template Framework | Assignee: | Patrick R. Gansterer <paroga> | ||||
Status: | NEW --- | ||||||
Severity: | Normal | CC: | benjamin, dglazkov, ggaren, gustavo, msaboff, peter+ews, philn, webkit.review.bot, xan.lopez | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | 96130 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Patrick R. Gansterer
2012-09-07 10:33:33 PDT
Created attachment 162814 [details]
Patch
This is very interesting Since it touches JSC's runtime. Could you please check SunSpider to ensure there are no regressions? Better safe than getting yelled at ;) Comment on attachment 162814 [details] Patch Attachment 162814 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/13777684 Comment on attachment 162814 [details] Patch Attachment 162814 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/13776782 Comment on attachment 162814 [details] Patch Attachment 162814 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/13774835 Comment on attachment 162814 [details] Patch Attachment 162814 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/13772829 Comment on attachment 162814 [details] Patch Attachment 162814 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/13786551 Comment on attachment 162814 [details] Patch Attachment 162814 [details] did not pass cr-android-ews (chromium-android): Output: http://queues.webkit.org/results/13777711 Comment on attachment 162814 [details] Patch Attachment 162814 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13788308 Comment on attachment 162814 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=162814&action=review review- because patch doesn’t build and so needs some additional work; probably should review a version that does build > Source/JavaScriptCore/runtime/NumberPrototype.cpp:388 > + WTF::NumberToStringBuffer buffer; The WTF:: prefix should not be needed here. > Source/WTF/wtf/dtoa.h:47 > -WTF_EXPORT_PRIVATE const char* numberToString(double, NumberToStringBuffer); > -WTF_EXPORT_PRIVATE const char* numberToFixedPrecisionString(double, unsigned significantFigures, NumberToStringBuffer, bool truncateTrailingZeros = false); > -WTF_EXPORT_PRIVATE const char* numberToFixedWidthString(double, unsigned decimalPlaces, NumberToStringBuffer); > +WTF_EXPORT_PRIVATE int numberToString(double, NumberToStringBuffer); > +WTF_EXPORT_PRIVATE int numberToFixedPrecisionString(double, unsigned significantFigures, NumberToStringBuffer, bool truncateTrailingZeros = false); > +WTF_EXPORT_PRIVATE int numberToFixedWidthString(double, unsigned decimalPlaces, NumberToStringBuffer); This return value is a lot less self-explanatory than the old one. We probably need a comment or some other form of explanation. Perhaps this should even be an out argument instead of a return value for clarity. |