Skip to content

Commit

Permalink
Create JS executor and context on main thread w/ custom JSC
Browse files Browse the repository at this point in the history
Reviewed By: javache

Differential Revision: D5165405

fbshipit-source-id: 35e5cfdf0518968c095ba54ec980d2fe376fa20e
  • Loading branch information
dcaspi authored and facebook-github-bot committed Jun 6, 2017
1 parent e5e3591 commit e284a9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions React/CxxBridge/RCTMessageThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions React/CxxBridge/RCTMessageThread.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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.