get the JSContext using working apis

This commit is contained in:
Ari Lazier 2016-08-08 10:16:43 -07:00
parent 9c8a1ed8ae
commit d1be354392

View File

@ -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>