Chromium Code Reviews| Index: sky/engine/core/frame/Tracing.cpp |
| diff --git a/sky/engine/core/frame/Tracing.cpp b/sky/engine/core/frame/Tracing.cpp |
| index 3359da2abb77fc51d02999922bd1cf9c567341a1..f05932615f1b50b9280f15b65d2707e78ce6dab1 100644 |
| --- a/sky/engine/core/frame/Tracing.cpp |
| +++ b/sky/engine/core/frame/Tracing.cpp |
| @@ -21,13 +21,17 @@ Tracing::~Tracing() |
| void Tracing::begin(const String& name) |
| { |
| StringUTF8Adaptor utf8(name); |
| - TRACE_EVENT_COPY_BEGIN0("script", utf8.data()); |
| + // TRACE_EVENT_COPY_BEGIN0 needs a c-style null-terminated string. |
|
jamesr
2015/04/29 00:12:46
in particular, StringUTF8Adapter::data() doesn't r
|
| + CString cstring(utf8.data(), utf8.length()); |
|
jamesr
2015/04/29 00:12:46
this could be std::string as well. I figured CStri
|
| + TRACE_EVENT_COPY_BEGIN0("script", cstring.data()); |
| } |
| void Tracing::end(const String& name) |
| { |
| StringUTF8Adaptor utf8(name); |
| - TRACE_EVENT_COPY_END0("script", utf8.data()); |
| + // TRACE_EVENT_COPY_END0 needs a c-style null-terminated string. |
| + CString cstring(utf8.data(), utf8.length()); |
| + TRACE_EVENT_COPY_END0("script", cstring.data()); |
| } |
| } // namespace blink |