Skip to content

Commit 9d172c0

Browse files
mdvaccameta-codesync[bot]
authored andcommitted
Explicitly set default values for field of structTraceEvent (#54190)
Summary: Pull Request resolved: #54190 Explicitly set default values for field of structTraceEvent changelog: [internal] internal Reviewed By: cortinico Differential Revision: D84954461 fbshipit-source-id: 51b950d26d4236ff561b77751983defaccd799b0
1 parent ff50b29 commit 9d172c0

File tree

1 file changed

+3
-3
lines changed
  • packages/react-native/ReactCommon/jsinspector-modern/tracing

1 file changed

+3
-3
lines changed

packages/react-native/ReactCommon/jsinspector-modern/tracing/TraceEvent.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct TraceEvent {
3131
* Optional. Serialized as a string, usually is hexadecimal number.
3232
* https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/helpers/Trace.ts#L198-L201
3333
*/
34-
std::optional<uint32_t> id;
34+
std::optional<uint32_t> id{};
3535

3636
/** The name of the event, as displayed in the Trace Viewer. */
3737
std::string name;
@@ -59,7 +59,7 @@ struct TraceEvent {
5959
* The scope of the event, either global (g), process (p), or thread (t).
6060
* Only applicable to instant events ("ph": "i").
6161
*/
62-
std::optional<char> s;
62+
std::optional<char> s{};
6363

6464
/** The ID for the thread that output this event. */
6565
ThreadId tid;
@@ -71,7 +71,7 @@ struct TraceEvent {
7171
* The duration of the event, in microseconds (µs). Only applicable to
7272
* complete events ("ph": "X").
7373
*/
74-
std::optional<HighResDuration> dur;
74+
std::optional<HighResDuration> dur{};
7575
};
7676

7777
} // namespace facebook::react::jsinspector_modern::tracing

0 commit comments

Comments
 (0)