forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add InspectorFlags, conditionally disable Hermes CDP registration (fa…
…cebook#41672) Summary: Progress towards an opt-in setup for our new CDP backend. - Adds `InspectorFlags.h`, a singleton intended to allow convienient access to static boolean feature flags for the new CDP backend/inspector features across platforms. This will be written to in upcoming diffs, with the accessor for `enable_modern_cdp_registry` soft-defaulting to `false` here. - References this to conditionally disable CDP registration in `HermesExecutorFactory` (Bridge) and `HermesInstance` (Bridgeless) code paths. - Stubs a `false` value for `react_native_devx:enable_modern_cdp_registry` in `EmptyReactNativeConfig` (documentation/convenience point for open source partners and integrators). Changelog: [Internal] Differential Revision: D51563107
- Loading branch information
1 parent
5476121
commit 7b7c9fa
Showing
5 changed files
with
41 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#pragma once | ||
|
||
namespace facebook::react::jsinspector_modern { | ||
|
||
/** | ||
* A container for all inspector related feature flags. These will be set | ||
* externally prior to React Native initialization. | ||
*/ | ||
class InspectorFlags { | ||
public: | ||
/** | ||
* Primary flag to enable the modern CDP backend. | ||
*/ | ||
static bool enableModernCDPRegistry; | ||
}; | ||
|
||
} // namespace facebook::react::jsinspector_modern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters