aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/Process.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/bindings/Process.h')
-rw-r--r--src/bun.js/bindings/Process.h22
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);
};