diff options
author | 2023-07-11 19:14:34 -0700 | |
---|---|---|
committer | 2023-07-11 19:14:34 -0700 | |
commit | cbb88672f217a90db1aa1eb29cd92d5d9035b22b (patch) | |
tree | 43a00501f3cde495967e116f0b660777051551f8 /src/bun.js/bindings/Process.h | |
parent | 1f900cff453700b19bca2acadfe26da4468c1282 (diff) | |
parent | 34b0e7a2bbd8bf8097341cdb0075d0908283e834 (diff) | |
download | bun-cbb88672f217a90db1aa1eb29cd92d5d9035b22b.tar.gz bun-cbb88672f217a90db1aa1eb29cd92d5d9035b22b.tar.zst bun-cbb88672f217a90db1aa1eb29cd92d5d9035b22b.zip |
Merge branch 'main' into jarred/esm-conditionsjarred/esm-conditions
Diffstat (limited to 'src/bun.js/bindings/Process.h')
-rw-r--r-- | src/bun.js/bindings/Process.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/bun.js/bindings/Process.h b/src/bun.js/bindings/Process.h index 322b39078..0ee6f4243 100644 --- a/src/bun.js/bindings/Process.h +++ b/src/bun.js/bindings/Process.h @@ -19,6 +19,8 @@ public: { } + void emitSignalEvent(int signalNumber); + DECLARE_EXPORT_INFO; static void destroy(JSC::JSCell* cell) @@ -28,7 +30,7 @@ public: ~Process(); - static constexpr unsigned StructureFlags = Base::StructureFlags; + static constexpr unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable; static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) @@ -45,6 +47,24 @@ public: return accessor; } + LazyProperty<JSObject, Structure> cpuUsageStructure; + LazyProperty<JSObject, Structure> memoryUsageStructure; + + DECLARE_VISIT_CHILDREN; + + template<typename, SubspaceAccess mode> + static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm) + { + if constexpr (mode == JSC::SubspaceAccess::Concurrently) + return nullptr; + return WebCore::subspaceForImpl<Process, WebCore::UseCustomHeapCellType::No>( + vm, + [](auto& spaces) { return spaces.m_clientSubspaceForProcessObject.get(); }, + [](auto& spaces, auto&& space) { spaces.m_clientSubspaceForProcessObject = std::forward<decltype(space)>(space); }, + [](auto& spaces) { return spaces.m_subspaceForProcessObject.get(); }, + [](auto& spaces, auto&& space) { spaces.m_subspaceForProcessObject = std::forward<decltype(space)>(space); }); + } + void finishCreation(JSC::VM& vm); }; |