Skip to content

Commit

Permalink
Guard JSGlobalContextSetInspectable behind a compile time check
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi committed Aug 16, 2023
1 parent be2bb51 commit eac3af1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/react-native/ReactCommon/jsc/JSCRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ class JSCRuntime : public jsi::Runtime {
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0
#define _JSC_NO_ARRAY_BUFFERS
#endif
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 164000
#define _JSC_HAS_INSPECTABLE
#endif
#endif
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_11
Expand Down Expand Up @@ -399,7 +402,7 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx)
#endif
{
#ifndef NDEBUG
#ifdef TARGET_OS_MAC
#if defined(_JSC_HAS_INSPECTABLE)
if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
JSGlobalContextSetInspectable(ctx_, true);
}
Expand Down

0 comments on commit eac3af1

Please sign in to comment.