diff options
author | 2023-07-08 14:26:19 -0700 | |
---|---|---|
committer | 2023-07-08 14:26:19 -0700 | |
commit | aa8b832ef61ada31176d248e716074ff22bb9dee (patch) | |
tree | ef125622db8bb593a6b9860c7c00437a98d93733 /src/bun.js/bindings/ZigGlobalObject.h | |
parent | fa632c33312ad3b4dca9e4bddaa2af1c7db07597 (diff) | |
download | bun-aa8b832ef61ada31176d248e716074ff22bb9dee.tar.gz bun-aa8b832ef61ada31176d248e716074ff22bb9dee.tar.zst bun-aa8b832ef61ada31176d248e716074ff22bb9dee.zip |
Implement `process.on("beforeExit", cb)` and `process.on("exit", cb)` (#3576)
* Support `process.on('beforeExit')` and `process.on('exit')`
* [bun:sqlite] Always call sqlite3_close on exit
* Update process.test.js
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/bindings/ZigGlobalObject.h')
-rw-r--r-- | src/bun.js/bindings/ZigGlobalObject.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.h b/src/bun.js/bindings/ZigGlobalObject.h index da6ba92a0..f44212da1 100644 --- a/src/bun.js/bindings/ZigGlobalObject.h +++ b/src/bun.js/bindings/ZigGlobalObject.h @@ -270,6 +270,8 @@ public: JSWeakMap* vmModuleContextMap() { return m_vmModuleContextMap.getInitializedOnMainThread(this); } + bool hasProcessObject() const { return m_processObject.isInitialized(); } + JSC::JSObject* processObject() { return m_processObject.getInitializedOnMainThread(this); |