Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1281)

Unified Diff: src/tracing/traced-value.cc

Issue 2628463002: [tracing] Use locale independent writer for FP values. (Closed)
Patch Set: update test Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/test-traced-value.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/tracing/traced-value.cc
diff --git a/src/tracing/traced-value.cc b/src/tracing/traced-value.cc
index 58d0f5d5bac9dfb016697e62032cc3d6003b6dd1..9b2a45c99107096a9a7d7f858d7f06e5f8038187 100644
--- a/src/tracing/traced-value.cc
+++ b/src/tracing/traced-value.cc
@@ -5,6 +5,7 @@
#include "src/tracing/traced-value.h"
#include "src/base/platform/platform.h"
+#include "src/conversions.h"
namespace v8 {
namespace tracing {
@@ -80,7 +81,8 @@ void TracedValue::SetInteger(const char* name, int value) {
void TracedValue::SetDouble(const char* name, double value) {
DCHECK_CURRENT_CONTAINER_IS(kStackTypeDict);
WriteName(name);
- data_ += std::to_string(value);
+ i::EmbeddedVector<char, 100> buffer;
+ data_ += DoubleToCString(value, buffer);
}
void TracedValue::SetBoolean(const char* name, bool value) {
@@ -120,7 +122,8 @@ void TracedValue::AppendInteger(int value) {
void TracedValue::AppendDouble(double value) {
DCHECK_CURRENT_CONTAINER_IS(kStackTypeArray);
WriteComma();
- data_ += std::to_string(value);
+ i::EmbeddedVector<char, 100> buffer;
+ data_ += DoubleToCString(value, buffer);
}
void TracedValue::AppendBoolean(bool value) {
« no previous file with comments | « no previous file | test/cctest/test-traced-value.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698