Skip to content
Closed
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
inspector: add missing initialization
Add missing initialization reported by coverity. With
proper usage it looks like it will be initialized but
still good to have it initialized to a known state in
case that changes or invalide usage.

The method used to create object ids newObjectId() starts
at 1 so initializing to 0 should be safe and what we get
now when compiled in a way that auto initializes (for example
debug)

Signed-off-by: Michael Dawson <mdawson@devrus.com>
  • Loading branch information
mhdawson committed May 30, 2022
commit a1a5036672ad9da979a334b0c0065693bfd4a15d
2 changes: 1 addition & 1 deletion src/inspector/tracing_agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TracingAgent : public NodeTracing::Backend {
Environment* env_;
std::shared_ptr<MainThreadHandle> main_thread_;
tracing::AgentWriterHandle trace_writer_;
int frontend_object_id_;
int frontend_object_id_ = 0;
std::shared_ptr<NodeTracing::Frontend> frontend_;
};

Expand Down