aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/JSStringDecoder.h
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2023-01-12 15:13:05 -0800
committerGravatar GitHub <noreply@github.com> 2023-01-12 15:13:05 -0800
commit00773e15f1e776aa6447bd607968623b3923d21a (patch)
tree54be3ca0eb17ab4f25c9ccde0a7c3ff230a2732f /src/bun.js/bindings/JSStringDecoder.h
parent126809f20c418454651f23959a2e8e070ce216a1 (diff)
downloadbun-00773e15f1e776aa6447bd607968623b3923d21a.tar.gz
bun-00773e15f1e776aa6447bd607968623b3923d21a.tar.zst
bun-00773e15f1e776aa6447bd607968623b3923d21a.zip
reset string decoder on end (#1782)
Diffstat (limited to 'src/bun.js/bindings/JSStringDecoder.h')
-rw-r--r--src/bun.js/bindings/JSStringDecoder.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bun.js/bindings/JSStringDecoder.h b/src/bun.js/bindings/JSStringDecoder.h
index 299c2fb96..bce1ae05d 100644
--- a/src/bun.js/bindings/JSStringDecoder.h
+++ b/src/bun.js/bindings/JSStringDecoder.h
@@ -11,7 +11,10 @@ class JSStringDecoder : public JSC::JSDestructibleObject {
public:
JSStringDecoder(JSC::VM& vm, JSC::Structure* structure, BufferEncodingType encoding)
- : Base(vm, structure), m_lastNeed(0), m_lastTotal(0), m_encoding(encoding)
+ : Base(vm, structure)
+ , m_lastNeed(0)
+ , m_lastTotal(0)
+ , m_encoding(encoding)
{
}
@@ -108,6 +111,7 @@ public:
// Must be defined for each specialization class.
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES construct(JSC::JSGlobalObject*, JSC::CallFrame*);
DECLARE_EXPORT_INFO;
+
private:
JSStringDecoderConstructor(JSC::VM& vm, JSC::Structure* structure, JSC::NativeFunction nativeFunction)
: Base(vm, structure, nativeFunction, nativeFunction)