Fix UB in SessionState init

Summary:
Changelog: [Internal]

Specifies initial values for `SessionState`'s bool fields to avoid relying on undefined behaviour.

Reviewed By: hoxyq

Differential Revision: D53704064

fbshipit-source-id: 798365a8eed8acea3aa50083bf325a0288765097
This commit is contained in:
Moti Zilberman
2024-02-13 07:14:49 -08:00
committed by Facebook GitHub Bot
parent 46d7f8a669
commit 8a12cfd2d1
@@ -14,8 +14,8 @@ namespace facebook::react::jsinspector_modern {
struct SessionState {
public:
// TODO: Generalise this to arbitrary domains
bool isLogDomainEnabled;
bool isRuntimeDomainEnabled;
bool isLogDomainEnabled{false};
bool isRuntimeDomainEnabled{false};
// Here, we will eventually allow RuntimeAgents to store their own arbitrary
// state (e.g. some sort of K/V storage of folly::dynamic?)