File tree Expand file tree Collapse file tree
packages/react-native/ReactCommon/yoga/yoga Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -279,11 +279,17 @@ size_t YGNodeGetChildCount(const YGNodeConstRef node) {
279279}
280280
281281YGNodeRef YGNodeGetOwner (const YGNodeRef node) {
282- return resolveRef (node)->getOwner ();
282+ // The owner is returned verbatim as an opaque handle. It may hold a
283+ // non-dereferenceable sentinel value, so it must not undergo a
284+ // derived-to-base conversion that asserts pointer alignment/validity.
285+ return reinterpret_cast <YGNodeRef>(resolveRef (node)->getOwner ());
283286}
284287
285288YGNodeRef YGNodeGetParent (const YGNodeRef node) {
286- return resolveRef (node)->getOwner ();
289+ // The owner is returned verbatim as an opaque handle. It may hold a
290+ // non-dereferenceable sentinel value, so it must not undergo a
291+ // derived-to-base conversion that asserts pointer alignment/validity.
292+ return reinterpret_cast <YGNodeRef>(resolveRef (node)->getOwner ());
287293}
288294
289295void YGNodeSetConfig (YGNodeRef node, YGConfigRef config) {
You can’t perform that action at this time.
0 commit comments