Support null messageQueueThread in JSCExecutor
Reviewed By: michalgr Differential Revision: D4119253 fbshipit-source-id: 2956434451bf4e649cfe4c0ee0a9b7339a5422a3
This commit is contained in:
parent
8e81644f64
commit
96cf9bb0c0
|
@ -201,9 +201,13 @@ JSCExecutor::~JSCExecutor() {
|
|||
|
||||
void JSCExecutor::destroy() {
|
||||
*m_isDestroyed = true;
|
||||
m_messageQueueThread->runOnQueueSync([this] () {
|
||||
if (m_messageQueueThread.get()) {
|
||||
m_messageQueueThread->runOnQueueSync([this] () {
|
||||
terminateOnJSVMThread();
|
||||
});
|
||||
} else {
|
||||
terminateOnJSVMThread();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void JSCExecutor::setContextName(const std::string& name) {
|
||||
|
|
Loading…
Reference in New Issue