Skip to content

Commit fb435d0

Browse files
committed
Backwards compatible?
1 parent cfee33b commit fb435d0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ReactCommon/jsc/JSCRuntime.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,11 @@ class JSCRuntime : public jsi::Runtime {
302302
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0
303303
#define _JSC_NO_ARRAY_BUFFERS
304304
#endif
305+
// [macOS
306+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 164000
307+
#define _JSC_HAS_INSPECTABLE
308+
#endif
309+
// macOS]
305310
#endif
306311
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
307312
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_11
@@ -400,11 +405,15 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx)
400405
{
401406
// [macOS
402407
#ifndef NDEBUG
408+
#ifdef TARGET_OS_MAC
409+
#ifdef _JSC_HAS_INSPECTABLE
403410
if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
404411
JSGlobalContextSetInspectable(ctx_, true);
405412
}
406-
// macOS]
407413
#endif
414+
#endif
415+
#endif
416+
// macOS]
408417
}
409418

410419
JSCRuntime::~JSCRuntime() {

0 commit comments

Comments
 (0)