diff options
Diffstat (limited to 'src/mongo/scripting/mozjs/jsthread.cpp')
-rw-r--r-- | src/mongo/scripting/mozjs/jsthread.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/scripting/mozjs/jsthread.cpp b/src/mongo/scripting/mozjs/jsthread.cpp index caa010f7083..be698fc82ae 100644 --- a/src/mongo/scripting/mozjs/jsthread.cpp +++ b/src/mongo/scripting/mozjs/jsthread.cpp @@ -193,6 +193,13 @@ private: MozJSImplScope scope(static_cast<MozJSScriptEngine*>(getGlobalScriptEngine()), boost::none /* Don't override global jsHeapLimitMB */); Client::initThread("js"); + + // TODO(SERVER-74662): Please revisit if this thread could be made killable. + { + stdx::lock_guard<Client> lk(cc()); + cc().setSystemOperationUnkillableByStepdown(lk); + } + scope.setParentStack(thisv->_sharedData->_stack); thisv->_sharedData->_returnData = scope.callThreadArgs(thisv->_sharedData->_args); } catch (...) { |