From 25447426f19702a0fff808b3d426d66f4d8e558d Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Wed, 17 May 2023 18:51:50 -0700 Subject: Make `BuildError` and `ResolveError` use C++ instead of JSC C API Fixes memory leak with private data never being cleared Fixes a case where a ResolveError could actually be a BuildError --- .../bindings/ZigGeneratedClasses+lazyStructureHeader.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/bun.js/bindings/ZigGeneratedClasses+lazyStructureHeader.h') diff --git a/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureHeader.h b/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureHeader.h index 2b01818b9..95a787f5e 100644 --- a/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureHeader.h +++ b/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureHeader.h @@ -10,6 +10,12 @@ JSC::Structure* JSBuildArtifactStructure() { return m_JSBuildArtifact.getInitial JSC::LazyClassStructure m_JSBuildArtifact; bool hasJSBuildArtifactSetterValue { false }; mutable JSC::WriteBarrier m_JSBuildArtifactSetterValue; +JSC::Structure* JSBuildMessageStructure() { return m_JSBuildMessage.getInitializedOnMainThread(this); } + JSC::JSObject* JSBuildMessageConstructor() { return m_JSBuildMessage.constructorInitializedOnMainThread(this); } + JSC::JSValue JSBuildMessagePrototype() { return m_JSBuildMessage.prototypeInitializedOnMainThread(this); } + JSC::LazyClassStructure m_JSBuildMessage; + bool hasJSBuildMessageSetterValue { false }; + mutable JSC::WriteBarrier m_JSBuildMessageSetterValue; JSC::Structure* JSCryptoHasherStructure() { return m_JSCryptoHasher.getInitializedOnMainThread(this); } JSC::JSObject* JSCryptoHasherConstructor() { return m_JSCryptoHasher.constructorInitializedOnMainThread(this); } JSC::JSValue JSCryptoHasherPrototype() { return m_JSCryptoHasher.prototypeInitializedOnMainThread(this); } @@ -76,6 +82,12 @@ JSC::Structure* JSRequestStructure() { return m_JSRequest.getInitializedOnMainTh JSC::LazyClassStructure m_JSRequest; bool hasJSRequestSetterValue { false }; mutable JSC::WriteBarrier m_JSRequestSetterValue; +JSC::Structure* JSResolveMessageStructure() { return m_JSResolveMessage.getInitializedOnMainThread(this); } + JSC::JSObject* JSResolveMessageConstructor() { return m_JSResolveMessage.constructorInitializedOnMainThread(this); } + JSC::JSValue JSResolveMessagePrototype() { return m_JSResolveMessage.prototypeInitializedOnMainThread(this); } + JSC::LazyClassStructure m_JSResolveMessage; + bool hasJSResolveMessageSetterValue { false }; + mutable JSC::WriteBarrier m_JSResolveMessageSetterValue; JSC::Structure* JSResponseStructure() { return m_JSResponse.getInitializedOnMainThread(this); } JSC::JSObject* JSResponseConstructor() { return m_JSResponse.constructorInitializedOnMainThread(this); } JSC::JSValue JSResponsePrototype() { return m_JSResponse.prototypeInitializedOnMainThread(this); } -- cgit v1.2.3