Skip to content

Commit d2a98dc

Browse files
mhdawsondanielleadams
authored andcommitted
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> PR-URL: #43254 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 066f963 commit d2a98dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/inspector/tracing_agent.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TracingAgent : public NodeTracing::Backend {
3131
Environment* env_;
3232
std::shared_ptr<MainThreadHandle> main_thread_;
3333
tracing::AgentWriterHandle trace_writer_;
34-
int frontend_object_id_;
34+
int frontend_object_id_ = 0;
3535
std::shared_ptr<NodeTracing::Frontend> frontend_;
3636
};
3737

0 commit comments

Comments
 (0)