diff options
author | 2022-06-30 19:27:30 -0700 | |
---|---|---|
committer | 2022-06-30 19:27:30 -0700 | |
commit | ac8dd5e59b1d90cd692bff2cc794f7c91b9b5edd (patch) | |
tree | 51049d4bce76cbddcee0b453025d23ae9ebf173d /src/bun.js/bindings/ZigGlobalObject.h | |
parent | c9f1d146c20fbdd13f31f8784a083512e1740c26 (diff) | |
download | bun-ac8dd5e59b1d90cd692bff2cc794f7c91b9b5edd.tar.gz bun-ac8dd5e59b1d90cd692bff2cc794f7c91b9b5edd.tar.zst bun-ac8dd5e59b1d90cd692bff2cc794f7c91b9b5edd.zip |
Create `process` object lazily
Diffstat (limited to 'src/bun.js/bindings/ZigGlobalObject.h')
-rw-r--r-- | src/bun.js/bindings/ZigGlobalObject.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.h b/src/bun.js/bindings/ZigGlobalObject.h index 24ac66ff1..0a0e0040a 100644 --- a/src/bun.js/bindings/ZigGlobalObject.h +++ b/src/bun.js/bindings/ZigGlobalObject.h @@ -173,6 +173,16 @@ public: JSC::JSMap* readableStreamNativeMap() { return m_lazyReadableStreamPrototypeMap.getInitializedOnMainThread(this); } JSC::JSMap* requireMap() { return m_requireMap.getInitializedOnMainThread(this); } + JSC::JSObject* processObject() + { + return m_processObject.getInitializedOnMainThread(this); + } + + JSC::JSObject* processEnvObject() + { + return m_processEnvObject.getInitializedOnMainThread(this); + } + void* bunVM() { return m_bunVM; } bool isThreadLocalDefaultGlobalObject = false; @@ -180,6 +190,7 @@ public: mutable WriteBarrier<JSFunction> m_readableStreamToText; mutable WriteBarrier<JSFunction> m_readableStreamToBlob; mutable WriteBarrier<JSFunction> m_readableStreamToJSON; + mutable WriteBarrier<JSFunction> m_readableStreamToArrayBuffer; private: void addBuiltinGlobals(JSC::VM&); @@ -203,8 +214,11 @@ private: LazyProperty<JSGlobalObject, JSObject> m_JSHTTPSResponseControllerPrototype; LazyProperty<JSGlobalObject, JSObject> m_JSHTTPResponseControllerPrototype; LazyProperty<JSGlobalObject, JSObject> m_importMetaObjectStructure; + LazyProperty<JSGlobalObject, JSObject> m_processObject; + LazyProperty<JSGlobalObject, JSObject> m_processEnvObject; LazyProperty<JSGlobalObject, JSMap> m_lazyReadableStreamPrototypeMap; LazyProperty<JSGlobalObject, JSMap> m_requireMap; + JSClassRef m_dotEnvClassRef; DOMGuardedObjectSet m_guardedObjects WTF_GUARDED_BY_LOCK(m_gcLock); void* m_bunVM; |