diff options
author | 2022-06-22 23:21:48 -0700 | |
---|---|---|
committer | 2022-06-22 23:21:48 -0700 | |
commit | 729d445b6885f69dd2c6355f38707bd42851c791 (patch) | |
tree | f87a7c408929ea3f57bbb7ace380cf869da83c0e /src/bun.js/bindings/Process.h | |
parent | 25f820c6bf1d8ec6d444ef579cc036b8c0607b75 (diff) | |
download | bun-729d445b6885f69dd2c6355f38707bd42851c791.tar.gz bun-729d445b6885f69dd2c6355f38707bd42851c791.tar.zst bun-729d445b6885f69dd2c6355f38707bd42851c791.zip |
change the directory structurejarred/rename
Diffstat (limited to 'src/bun.js/bindings/Process.h')
-rw-r--r-- | src/bun.js/bindings/Process.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/bun.js/bindings/Process.h b/src/bun.js/bindings/Process.h new file mode 100644 index 000000000..a710edbad --- /dev/null +++ b/src/bun.js/bindings/Process.h @@ -0,0 +1,47 @@ +#pragma once + +#include "root.h" + +#include "BunBuiltinNames.h" +#include "BunClientData.h" + +namespace Zig { + +using namespace JSC; + +class Process : public JSC::JSNonFinalObject { + using Base = JSC::JSNonFinalObject; + +public: + Process(JSC::VM& vm, JSC::Structure* structure) + : Base(vm, structure) + { + } + + DECLARE_INFO; + + static constexpr unsigned StructureFlags = Base::StructureFlags; + + template<typename CellType, SubspaceAccess> static GCClient::IsoSubspace* subspaceFor(VM& vm) + { + return &vm.plainObjectSpace(); + } + + static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, + JSC::JSValue prototype) + { + return JSC::Structure::create(vm, globalObject, prototype, + JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); + } + + static Process* create(JSC::VM& vm, JSC::Structure* structure) + { + Process* accessor = new (NotNull, JSC::allocateCell<Process>(vm)) Process(vm, structure); + accessor->finishCreation(vm); + return accessor; + } + + void finishCreation(JSC::VM& vm); +}; + +} // namespace Zig
\ No newline at end of file |