Create JS executor and context on main thread w/ custom JSC
Reviewed By: javache Differential Revision: D5165405 fbshipit-source-id: 35e5cfdf0518968c095ba54ec980d2fe376fa20e
This commit is contained in:
parent
e5e3591009
commit
e284a9db8c
|
@ -24,6 +24,7 @@ class RCTMessageThread : public MessageQueueThread {
|
|||
void runOnQueue(std::function<void()>&&) override;
|
||||
void runOnQueueSync(std::function<void()>&&) override;
|
||||
void quitSynchronous() override;
|
||||
void setRunLoop(NSRunLoop *runLoop);
|
||||
|
||||
private:
|
||||
void tryFunc(const std::function<void()>& func);
|
||||
|
|
|
@ -94,5 +94,11 @@ void RCTMessageThread::quitSynchronous() {
|
|||
CFRunLoopStop(m_cfRunLoop);
|
||||
}
|
||||
|
||||
void RCTMessageThread::setRunLoop(NSRunLoop *runLoop) {
|
||||
CFRelease(m_cfRunLoop);
|
||||
m_cfRunLoop = [runLoop getCFRunLoop];
|
||||
CFRetain(m_cfRunLoop);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue