mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix incorrect invocation of JSClassCreate
Reviewed By: kathryngray Differential Revision: D5465118 fbshipit-source-id: 16e1a1af52fb1ef41fa02e380223e9e90c0611ba
This commit is contained in:
committed by
Facebook Github Bot
parent
db3df3400a
commit
543cd217f6
@@ -31,10 +31,12 @@
|
||||
|
||||
// Use for methods were access to a JSContextRef is impractical. The first bool param
|
||||
// will be dropped before the JSC method is invoked.
|
||||
#define __jsc_bool_wrapper(method, useCustomJSC, ...) \
|
||||
(useCustomJSC ? \
|
||||
facebook::react::customJSCWrapper() : \
|
||||
facebook::react::systemJSCWrapper() \
|
||||
#define __jsc_ensure_bool(field) \
|
||||
static_assert(std::is_same<typename std::decay<decltype(field)>::type, bool>::value, "useCustomJSC must be bool");
|
||||
#define __jsc_bool_wrapper(method, useCustomJSC, ...) \
|
||||
([]{ __jsc_ensure_bool(useCustomJSC) }, useCustomJSC ? \
|
||||
facebook::react::customJSCWrapper() : \
|
||||
facebook::react::systemJSCWrapper() \
|
||||
)->method(__VA_ARGS__)
|
||||
|
||||
// Used for wrapping properties
|
||||
|
||||
Reference in New Issue
Block a user