From 86caf598f213795e4af418fcdf2f75faa4e6feea Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sun, 31 Aug 2025 02:06:36 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- src/bun.js/bindings/JSYogaConfig.cpp | 4 ++-- src/bun.js/bindings/JSYogaNode.cpp | 6 +++--- src/bun.js/bindings/YogaNodeImpl.h | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/bun.js/bindings/JSYogaConfig.cpp b/src/bun.js/bindings/JSYogaConfig.cpp index 4aa75b1a39..adcf8d6f13 100644 --- a/src/bun.js/bindings/JSYogaConfig.cpp +++ b/src/bun.js/bindings/JSYogaConfig.cpp @@ -89,10 +89,10 @@ template void JSYogaConfig::visitOutputConstraints(JSC::JSCell* cell, Visitor& visitor) { auto* thisObject = jsCast(cell); - + // Lock for concurrent GC thread safety WTF::Locker locker { thisObject->cellLock() }; - + ASSERT_GC_OBJECT_INHERITS(thisObject, info()); Base::visitOutputConstraints(thisObject, visitor); thisObject->visitAdditionalChildren(visitor); diff --git a/src/bun.js/bindings/JSYogaNode.cpp b/src/bun.js/bindings/JSYogaNode.cpp index f0465e3817..02568a0ff7 100644 --- a/src/bun.js/bindings/JSYogaNode.cpp +++ b/src/bun.js/bindings/JSYogaNode.cpp @@ -58,7 +58,7 @@ void JSYogaNode::finishCreation(JSC::VM& vm, YGConfigRef config, JSYogaConfig* j // Set this JS wrapper in the C++ impl m_impl->setJSWrapper(this); - // Store the JSYogaConfig if provided + // Store the JSYogaConfig if provided if (jsConfig) { m_config.set(vm, this, jsConfig); } @@ -70,7 +70,7 @@ void JSYogaNode::finishCreation(JSC::VM& vm) // Set this JS wrapper in the C++ impl m_impl->setJSWrapper(this); - + // No JSYogaConfig in this path - it's only set when explicitly provided } @@ -132,7 +132,7 @@ void JSYogaNode::visitOutputConstraints(JSC::JSCell* cell, Visitor& visitor) auto* thisObject = jsCast(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, info()); Base::visitOutputConstraints(thisObject, visitor); - + // Re-visit after mutator execution in case callbacks changed references // This is critical for objects whose reachability can change during runtime thisObject->visitAdditionalChildren(visitor); diff --git a/src/bun.js/bindings/YogaNodeImpl.h b/src/bun.js/bindings/YogaNodeImpl.h index 949719b4b0..66c4db0da0 100644 --- a/src/bun.js/bindings/YogaNodeImpl.h +++ b/src/bun.js/bindings/YogaNodeImpl.h @@ -23,11 +23,10 @@ public: void clearJSWrapper(); void clearJSWrapperWithoutDeref(); // Clear weak ref without deref (for JS destructor) JSYogaNode* jsWrapper() const; - + // Config access through JS wrapper's WriteBarrier JSYogaConfig* jsConfig() const; - // Helper to get YogaNodeImpl from YGNodeRef static YogaNodeImpl* fromYGNode(YGNodeRef);