Permalink
Browse files

Create JS executor and context on main thread w/ custom JSC

Reviewed By: javache

Differential Revision: D5165405

fbshipit-source-id: 35e5cfdf0518968c095ba54ec980d2fe376fa20e
  • Loading branch information...
Dan Caspi authored and facebook-github-bot committed Jun 6, 2017
1 parent e5e3591 commit e284a9db8cd32cb9a1baad599193a6ab78546c99
Showing with 7 additions and 0 deletions.
  1. +1 −0 React/CxxBridge/RCTMessageThread.h
  2. +6 −0 React/CxxBridge/RCTMessageThread.mm
@@ -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 @@
CFRunLoopStop(m_cfRunLoop);
}
void RCTMessageThread::setRunLoop(NSRunLoop *runLoop) {
CFRelease(m_cfRunLoop);
m_cfRunLoop = [runLoop getCFRunLoop];
CFRetain(m_cfRunLoop);
}
}
}

0 comments on commit e284a9d

Please sign in to comment.