diff options
author | Matt Broadstone <mbroadst@mongodb.com> | 2022-11-10 15:57:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-11-10 16:57:58 +0000 |
commit | 5f48de0b74f684bceac80a3a237a2a0f197f23d6 (patch) | |
tree | 088cb427b79c2edd2b6be4c581f0ce3396c5f930 /src/mongo/scripting/mozjs/implscope.h | |
parent | d5ff440817391833df0ee8d918689cef60140d90 (diff) | |
download | mongo-5f48de0b74f684bceac80a3a237a2a0f197f23d6.tar.gz |
SERVER-70553 Add ES Modules support to mongo test runner
Diffstat (limited to 'src/mongo/scripting/mozjs/implscope.h')
-rw-r--r-- | src/mongo/scripting/mozjs/implscope.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/scripting/mozjs/implscope.h b/src/mongo/scripting/mozjs/implscope.h index 27bb26925de..de516ee1525 100644 --- a/src/mongo/scripting/mozjs/implscope.h +++ b/src/mongo/scripting/mozjs/implscope.h @@ -30,9 +30,9 @@ #pragma once #include <jsapi.h> +#include <jsfriendapi.h> #include <vm/PosixNSPR.h> - #include "mongo/client/dbclient_cursor.h" #include "mongo/scripting/mozjs/bindata.h" #include "mongo/scripting/mozjs/bson.h" @@ -53,6 +53,7 @@ #include "mongo/scripting/mozjs/jsthread.h" #include "mongo/scripting/mozjs/maxkey.h" #include "mongo/scripting/mozjs/minkey.h" +#include "mongo/scripting/mozjs/module_loader.h" #include "mongo/scripting/mozjs/mongo.h" #include "mongo/scripting/mozjs/mongohelpers.h" #include "mongo/scripting/mozjs/nativefunction.h" @@ -320,6 +321,7 @@ public: return _globalProto; } + static const char* const kInteractiveShellName; static const char* const kExecResult; static const char* const kInvokeResult; @@ -369,6 +371,8 @@ public: void setStatus(Status status); + ModuleLoader* getModuleLoader() const; + private: template <typename ImplScopeFunction> auto _runSafely(ImplScopeFunction&& functionToRun) -> decltype(functionToRun()); @@ -437,6 +441,8 @@ private: bool _inReportError; + std::unique_ptr<ModuleLoader> _moduleLoader; + WrapType<BinDataInfo> _binDataProto; WrapType<BSONInfo> _bsonProto; WrapType<CodeInfo> _codeProto; |