aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/ZigGlobalObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/bindings/ZigGlobalObject.cpp')
-rw-r--r--src/bun.js/bindings/ZigGlobalObject.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp
index 0d0ec1128..85b3c27ee 100644
--- a/src/bun.js/bindings/ZigGlobalObject.cpp
+++ b/src/bun.js/bindings/ZigGlobalObject.cpp
@@ -1993,8 +1993,9 @@ void GlobalObject::finishCreation(VM& vm)
m_processObject.initLater(
[](const JSC::LazyProperty<JSC::JSGlobalObject, JSC::JSObject>::Initializer& init) {
+ Zig::GlobalObject* globalObject = reinterpret_cast<Zig::GlobalObject*>(init.owner);
auto* process = Zig::Process::create(
- init.vm, Zig::Process::createStructure(init.vm, init.owner, init.owner->objectPrototype()));
+ *globalObject, Zig::Process::createStructure(init.vm, init.owner, WebCore::JSEventEmitter::prototype(init.vm, *globalObject)));
process->putDirectCustomAccessor(init.vm, JSC::Identifier::fromString(init.vm, "env"_s),
JSC::CustomGetterSetter::create(init.vm, lazyProcessEnvGetter, lazyProcessEnvSetter),
JSC::PropertyAttribute::DontDelete