diff options
Diffstat (limited to 'src/bun.js/bindings/ScriptExecutionContext.h')
-rw-r--r-- | src/bun.js/bindings/ScriptExecutionContext.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/bun.js/bindings/ScriptExecutionContext.h b/src/bun.js/bindings/ScriptExecutionContext.h index fcf65f477..c3fbd7c9b 100644 --- a/src/bun.js/bindings/ScriptExecutionContext.h +++ b/src/bun.js/bindings/ScriptExecutionContext.h @@ -81,6 +81,15 @@ public: regenerateIdentifier(); } + ScriptExecutionContext(JSC::VM* vm, JSC::JSGlobalObject* globalObject, ScriptExecutionContextIdentifier identifier) + : m_vm(vm) + , m_globalObject(globalObject) + , m_identifier(identifier) + { + } + + static ScriptExecutionContextIdentifier generateIdentifier(); + JSC::JSGlobalObject* jsGlobalObject() { return m_globalObject; @@ -170,6 +179,12 @@ public: JSC::VM& vm() { return *m_vm; } ScriptExecutionContextIdentifier identifier() const { return m_identifier; } + bool isWorker = false; + void setGlobalObject(JSC::JSGlobalObject* globalObject) + { + m_globalObject = globalObject; + } + private: JSC::VM* m_vm = nullptr; JSC::JSGlobalObject* m_globalObject = nullptr; |