mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-10 14:25:58 +00:00
get the JSContext using working apis
This commit is contained in:
parent
9c8a1ed8ae
commit
d1be354392
@ -46,7 +46,7 @@ using namespace realm::rpc;
|
||||
@interface NSObject ()
|
||||
- (instancetype)initWithJSContext:(JSContext *)context;
|
||||
- (instancetype)initWithJSContext:(JSContext *)context onThread:(NSThread *)thread;
|
||||
- (JSGlobalContextRef)ctx;
|
||||
- (JSContext *)context;
|
||||
@end
|
||||
|
||||
extern "C" JSGlobalContextRef RealmReactGetJSGlobalContextForExecutor(id executor, bool create) {
|
||||
@ -71,7 +71,7 @@ extern "C" JSGlobalContextRef RealmReactGetJSGlobalContextForExecutor(id executo
|
||||
object_setIvar(executor, contextIvar, rctJSContext);
|
||||
}
|
||||
|
||||
return [rctJSContext ctx];
|
||||
return [rctJSContext context].JSGlobalContextRef;
|
||||
}
|
||||
|
||||
@interface RealmReact () <RCTBridgeModule>
|
||||
|
Loading…
x
Reference in New Issue
Block a user