shut down JSC before quitting its thread
Differential Revision: D3280544 fbshipit-source-id: 2a3ef2c445aaa1b224ac391b020467e087c0b81d
This commit is contained in:
parent
779314a413
commit
6796f136f1
|
@ -303,13 +303,13 @@ ExecutorToken NativeToJsBridge::getTokenForExecutor(JSExecutor& executor) {
|
|||
|
||||
void NativeToJsBridge::destroy() {
|
||||
m_delegate->quitQueueSynchronous();
|
||||
auto executorMessageQueueThread = getMessageQueueThread(m_mainExecutorToken);
|
||||
executorMessageQueueThread->runOnQueueSync([this, &executorMessageQueueThread] {
|
||||
auto* executorMessageQueueThread = getMessageQueueThread(m_mainExecutorToken);
|
||||
executorMessageQueueThread->runOnQueueSync([this, executorMessageQueueThread] {
|
||||
m_mainExecutor->destroy();
|
||||
executorMessageQueueThread->quitSynchronous();
|
||||
*m_destroyed = true;
|
||||
std::unique_ptr<JSExecutor> mainExecutor = unregisterExecutor(*m_mainExecutor);
|
||||
unregisterExecutor(*m_mainExecutor);
|
||||
m_mainExecutor = nullptr;
|
||||
mainExecutor->destroy();
|
||||
*m_destroyed = true;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue