summaryrefslogtreecommitdiff
path: root/src/mongo/scripting/mozjs/proxyscope.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/scripting/mozjs/proxyscope.cpp')
-rw-r--r--src/mongo/scripting/mozjs/proxyscope.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/scripting/mozjs/proxyscope.cpp b/src/mongo/scripting/mozjs/proxyscope.cpp
index 1adc91f78d3..23d3194799c 100644
--- a/src/mongo/scripting/mozjs/proxyscope.cpp
+++ b/src/mongo/scripting/mozjs/proxyscope.cpp
@@ -364,9 +364,16 @@ void MozJSProxyScope::shutdownThread() {
* break out of the loop and return.
*/
void MozJSProxyScope::implThread(MozJSProxyScope* proxy) {
- if (hasGlobalServiceContext())
+ if (hasGlobalServiceContext()) {
Client::initThread("js");
+ // TODO(SERVER-74662): Please revisit if this thread could be made killable.
+ {
+ stdx::lock_guard<Client> lk(cc());
+ cc().setSystemOperationUnkillableByStepdown(lk);
+ }
+ }
+
std::unique_ptr<MozJSImplScope> scope;
// This will leave _status set for the first noop runOnImplThread(), which