Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ class HostTarget;
class HostTargetTraceRecording;

struct HostTargetMetadata {
std::optional<std::string> appDisplayName;
std::optional<std::string> appIdentifier;
std::optional<std::string> deviceName;
std::optional<std::string> appDisplayName{};
std::optional<std::string> appIdentifier{};
std::optional<std::string> deviceName{};
std::optional<std::string> integrationName;
std::optional<std::string> platform;
std::optional<std::string> reactNativeVersion;
std::optional<std::string> platform{};
std::optional<std::string> reactNativeVersion{};
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ struct ReadStreamParams {

struct NetworkResource {
bool success{};
std::optional<std::string> stream;
std::optional<uint32_t> httpStatusCode;
std::optional<std::string> netErrorName;
std::optional<Headers> headers;
std::optional<std::string> stream{};
std::optional<uint32_t> httpStatusCode{};
std::optional<std::string> netErrorName{};
std::optional<Headers> headers{};
folly::dynamic toDynamic() const {
auto dynamicResource = folly::dynamic::object("success", success);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ namespace facebook::react {
* reporting.
*/
struct ResourceTimingData {
std::string url;
HighResTimeStamp fetchStart;
HighResTimeStamp requestStart;
std::optional<HighResTimeStamp> connectStart;
std::optional<HighResTimeStamp> connectEnd;
std::optional<HighResTimeStamp> responseStart;
std::string url{};
HighResTimeStamp fetchStart{};
HighResTimeStamp requestStart{};
std::optional<HighResTimeStamp> connectStart{};
std::optional<HighResTimeStamp> connectEnd{};
std::optional<HighResTimeStamp> responseStart{};
int responseStatus = 0;
std::string contentType;
std::string contentType{};
int encodedBodySize = 0;
int decodedBodySize = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ReactInstance final : private jsinspector_modern::InstanceTargetDelegate {

struct JSRuntimeFlags {
bool isProfiling = false;
const std::string runtimeDiagnosticFlags;
const std::string runtimeDiagnosticFlags = {};
};

void initializeRuntime(
Expand Down
Loading