Skip to content

Commit

Permalink
fusebox testing
Browse files Browse the repository at this point in the history
  • Loading branch information
joemun committed Jan 11, 2025
1 parent a7a0e96 commit 66ce55f
Show file tree
Hide file tree
Showing 5 changed files with 13,998 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/react-native/React/Base/RCTBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ - (void)didReceiveReloadCommand
{
#if RCT_ENABLE_INSPECTOR
auto &inspectorFlags = facebook::react::jsinspector_modern::InspectorFlags::getInstance();
RCTLogInfo(@"inspectorFlags.getFuseboxEnabled(): %@", inspectorFlags.getFuseboxEnabled());
if (!inspectorFlags.getFuseboxEnabled()) {
// Disable debugger to resume the JsVM & avoid thread locks while reloading
[RCTInspectorDevServerHelper disableDebugger];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ void InspectorFlags::dangerouslyResetFlags() {

const InspectorFlags::Values& InspectorFlags::loadFlagsAndAssertUnchanged()
const {

extern "C" void logMacroValues() {
#if defined(REACT_NATIVE_FORCE_ENABLE_FUSEBOX)
NSLog(@"REACT_NATIVE_FORCE_ENABLE_FUSEBOX is defined");
#elif defined(REACT_NATIVE_FORCE_DISABLE_FUSEBOX)
NSLog(@"REACT_NATIVE_FORCE_DISABLE_FUSEBOX is defined");
#elif defined(HERMES_ENABLE_DEBUGGER) && defined(REACT_NATIVE_ENABLE_FUSEBOX_DEBUG)
NSLog(@"HERMES_ENABLE_DEBUGGER and REACT_NATIVE_ENABLE_FUSEBOX_DEBUG are defined");
#elif defined(HERMES_ENABLE_DEBUGGER)
NSLog(@"HERMES_ENABLE_DEBUGGER is defined");
#else
NSLog(@"None of the specific macros are defined. Using release behavior.");
#endif
}

InspectorFlags::Values newValues = {
.fuseboxEnabled =
#if defined(REACT_NATIVE_FORCE_ENABLE_FUSEBOX)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

fxvjklxcvjkl from git checkout
#import "RCTHost.h"
#import "RCTHost+Internal.h"

Expand Down Expand Up @@ -207,6 +207,10 @@ - (void)start
[self _setBundleURL:_bundleURLProvider()];
}
auto &inspectorFlags = jsinspector_modern::InspectorFlags::getInstance();

RCTLogInfo(@"inspectorFlags: %@", inspectorFlags);
print("[JOE] inspectorFlags", arg1, arg2)

if (inspectorFlags.getFuseboxEnabled() && !_inspectorPageId.has_value()) {
_inspectorTarget =
facebook::react::jsinspector_modern::HostTarget::create(*_inspectorHostDelegate, [](auto callback) {
Expand Down
Loading

0 comments on commit 66ce55f

Please sign in to comment.