Skip to content

Commit ffe79ac

Browse files
mhdawsontargos
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 <[email protected]> PR-URL: #43254 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 8b9f93c commit ffe79ac

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)