diff options
author | 2022-11-20 00:58:46 -0800 | |
---|---|---|
committer | 2022-11-20 00:58:46 -0800 | |
commit | b745ae26677083ba6fe36bb72441ce338e881a0e (patch) | |
tree | 6a5bbe2f04b2bbd95ce62489e07c132e41fc3acb /src/bun.js/bindings/ZigGeneratedClasses.cpp | |
parent | 2f1e9b2eb8ab4f210dd356735f5b610deb89987b (diff) | |
download | bun-b745ae26677083ba6fe36bb72441ce338e881a0e.tar.gz bun-b745ae26677083ba6fe36bb72441ce338e881a0e.tar.zst bun-b745ae26677083ba6fe36bb72441ce338e881a0e.zip |
[TCP] Make `Socket` more careful about GC
Diffstat (limited to 'src/bun.js/bindings/ZigGeneratedClasses.cpp')
-rw-r--r-- | src/bun.js/bindings/ZigGeneratedClasses.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bun.js/bindings/ZigGeneratedClasses.cpp b/src/bun.js/bindings/ZigGeneratedClasses.cpp index 5618245cf..926bca81c 100644 --- a/src/bun.js/bindings/ZigGeneratedClasses.cpp +++ b/src/bun.js/bindings/ZigGeneratedClasses.cpp @@ -488,6 +488,12 @@ extern "C" EncodedJSValue TCPSocket__getConstructor(Zig::GlobalObject* globalObj return JSValue::encode(globalObject->JSTCPSocketConstructor()); } +extern "C" bool TCPSocket__hasPendingActivity(void* ptr); +bool JSTCPSocket::internalHasPendingActivity() +{ + return TCPSocket__hasPendingActivity(m_ctx); +} + JSTCPSocket::~JSTCPSocket() { if (m_ctx) { @@ -1033,6 +1039,12 @@ extern "C" EncodedJSValue TLSSocket__getConstructor(Zig::GlobalObject* globalObj return JSValue::encode(globalObject->JSTLSSocketConstructor()); } +extern "C" bool TLSSocket__hasPendingActivity(void* ptr); +bool JSTLSSocket::internalHasPendingActivity() +{ + return TLSSocket__hasPendingActivity(m_ctx); +} + JSTLSSocket::~JSTLSSocket() { if (m_ctx) { |