Explicitly set default values for field of structTraceEvent (#54190)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54190

Explicitly set default values for field of structTraceEvent

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D84954461

fbshipit-source-id: 51b950d26d4236ff561b77751983defaccd799b0
This commit is contained in:
David Vacca
2025-10-17 21:28:39 -07:00
committed by meta-codesync[bot]
parent ff50b29050
commit 9d172c0b37
@@ -31,7 +31,7 @@ struct TraceEvent {
* Optional. Serialized as a string, usually is hexadecimal number.
* https://github.com/ChromeDevTools/devtools-frontend/blob/99a9104ae974f8caa63927e356800f6762cdbf25/front_end/models/trace/helpers/Trace.ts#L198-L201
*/
std::optional<uint32_t> id;
std::optional<uint32_t> id{};
/** The name of the event, as displayed in the Trace Viewer. */
std::string name;
@@ -59,7 +59,7 @@ struct TraceEvent {
* The scope of the event, either global (g), process (p), or thread (t).
* Only applicable to instant events ("ph": "i").
*/
std::optional<char> s;
std::optional<char> s{};
/** The ID for the thread that output this event. */
ThreadId tid;
@@ -71,7 +71,7 @@ struct TraceEvent {
* The duration of the event, in microseconds (µs). Only applicable to
* complete events ("ph": "X").
*/
std::optional<HighResDuration> dur;
std::optional<HighResDuration> dur{};
};
} // namespace facebook::react::jsinspector_modern::tracing