Skip to content

Instantly share code, notes, and snippets.

@antoniopresto
Created July 14, 2025 18:32
Show Gist options
  • Save antoniopresto/37e6a0330430ff1c4cef74ffd3d01415 to your computer and use it in GitHub Desktop.
Save antoniopresto/37e6a0330430ff1c4cef74ffd3d01415 to your computer and use it in GitHub Desktop.
diff --git a/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp b/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
index 362d76d..7b00d71 100644
--- a/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
+++ b/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
@@ -368,9 +368,9 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx)
#endif
{
#ifndef NDEBUG
-#ifdef _JSC_HAS_INSPECTABLE
- if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
- JSGlobalContextSetInspectable(ctx_, true);
+#if (__OSX_AVAILABLE_STARTING(MAC_NA, IPHONE_16_4))
+ if (_builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
+ JSGlobalContextSetInspectable(ctx, true);
}
#endif
#endif
@@ -385,12 +385,6 @@ JSCRuntime::~JSCRuntime() {
// has started.
ctxInvalid_ = true;
JSGlobalContextRelease(ctx_);
-#ifndef NDEBUG
- assert(
- objectCounter_ == 0 && "JSCRuntime destroyed with a dangling API object");
- assert(
- stringCounter_ == 0 && "JSCRuntime destroyed with a dangling API string");
-#endif
}
std::shared_ptr<const jsi::PreparedJavaScript> JSCRuntime::prepareJavaScript(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment