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

Issue 1107853003: Fix up strings Sky passes to base/trace_event (Closed)

Created:
5 years, 7 months ago by jamesr
Modified:
5 years, 7 months ago
Reviewers:
eseidel, ojan
CC:
mojo-reviews_chromium.org, ojan, qsr+mojo_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Fix up strings Sky passes to base/trace_event String parameters passed to the trace macros in base/trace_event must either be std::string (which Sky doesn't use very much), pointers to null terminated C-style strings that live forever (like a string literal) pointers to C-style strings that are annotated by macro as needing to be copied. This fixes up a few instances that passed pointers to temporary strings without the copying annotation or pointers to non-null-terminated strings so the trace data doesn't have random garbage memory in it. R=eseidel@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/59689550d58a02d0e76145f51a3587d96b87b329

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -7 lines) Patch
M sky/engine/core/events/GenericEventQueue.cpp View 3 chunks +11 lines, -3 lines 3 comments Download
M sky/engine/core/fetch/ResourceFetcher.cpp View 1 chunk +4 lines, -1 line 1 comment Download
M sky/engine/core/frame/Tracing.cpp View 1 chunk +6 lines, -2 lines 2 comments Download
M sky/engine/web/WebViewImpl.cpp View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
jamesr
https://codereview.chromium.org/1107853003/diff/1/sky/engine/core/events/GenericEventQueue.cpp File sky/engine/core/events/GenericEventQueue.cpp (right): https://codereview.chromium.org/1107853003/diff/1/sky/engine/core/events/GenericEventQueue.cpp#newcode61 sky/engine/core/events/GenericEventQueue.cpp:61: TRACE_STR_COPY(event->type().ascii().data())); event->type().ascii().data() is a pointer to temporary data that ...
5 years, 7 months ago (2015-04-29 00:12:46 UTC) #2
jamesr
5 years, 7 months ago (2015-04-29 17:10:05 UTC) #4
jamesr
5 years, 7 months ago (2015-05-04 23:42:40 UTC) #5
eseidel
lgtm This seems really error prone. I'm surprised Blink didn't do something nicer. We could ...
5 years, 7 months ago (2015-05-04 23:45:21 UTC) #6
abarth-chromium
On 2015/05/04 at 23:45:21, eseidel wrote: > This seems really error prone. I'm surprised Blink ...
5 years, 7 months ago (2015-05-05 00:04:59 UTC) #7
jamesr
5 years, 7 months ago (2015-05-06 00:59:13 UTC) #8
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
59689550d58a02d0e76145f51a3587d96b87b329 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698