diff options
author | 2023-07-09 16:33:49 -0700 | |
---|---|---|
committer | 2023-07-09 16:33:49 -0700 | |
commit | ca42c820d29400d8bd93f493064db029f6d4420d (patch) | |
tree | 7d05580229fbab45a9fa54bec19d320d16a76ce2 /src/bun.js/bindings/ZigGlobalObject.cpp | |
parent | 565d1689e9f2c1f6b657f14b07fa9b95e50a5a56 (diff) | |
download | bun-ca42c820d29400d8bd93f493064db029f6d4420d.tar.gz bun-ca42c820d29400d8bd93f493064db029f6d4420d.tar.zst bun-ca42c820d29400d8bd93f493064db029f6d4420d.zip |
Implement nearly all of `process` object methods and properties (#3581)
* Add special case
* Make process object load faster
* Fix openStdin
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/bindings/ZigGlobalObject.cpp')
-rw-r--r-- | src/bun.js/bindings/ZigGlobalObject.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp index 4bb5445e1..3291b204e 100644 --- a/src/bun.js/bindings/ZigGlobalObject.cpp +++ b/src/bun.js/bindings/ZigGlobalObject.cpp @@ -3160,11 +3160,7 @@ void GlobalObject::finishCreation(VM& vm) Zig::GlobalObject* globalObject = reinterpret_cast<Zig::GlobalObject*>(init.owner); auto* process = Zig::Process::create( *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 - | JSC::PropertyAttribute::CustomValue - | 0); + init.set(process); }); |