Skip to content

Commit e284a9d

Browse files
dcaspifacebook-github-bot
authored andcommitted
Create JS executor and context on main thread w/ custom JSC
Reviewed By: javache Differential Revision: D5165405 fbshipit-source-id: 35e5cfdf0518968c095ba54ec980d2fe376fa20e
1 parent e5e3591 commit e284a9d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

React/CxxBridge/RCTMessageThread.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class RCTMessageThread : public MessageQueueThread {
2424
void runOnQueue(std::function<void()>&&) override;
2525
void runOnQueueSync(std::function<void()>&&) override;
2626
void quitSynchronous() override;
27+
void setRunLoop(NSRunLoop *runLoop);
2728

2829
private:
2930
void tryFunc(const std::function<void()>& func);

React/CxxBridge/RCTMessageThread.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,11 @@
9494
CFRunLoopStop(m_cfRunLoop);
9595
}
9696

97+
void RCTMessageThread::setRunLoop(NSRunLoop *runLoop) {
98+
CFRelease(m_cfRunLoop);
99+
m_cfRunLoop = [runLoop getCFRunLoop];
100+
CFRetain(m_cfRunLoop);
101+
}
102+
97103
}
98104
}

0 commit comments

Comments
 (0)