@samitouri / QOS-React / commits / d7c4334ce9

Add _debugStack and _debugTask under enableObjectFiber flag (#30337)

Jan Kassens committed Jul 22, 2024 at 14:10 UTC d7c4334ce91726ddff4b6ba84ff6bd81eb3a91d5
1 file changed +5 -1
packages/react-reconciler/src/ReactFiber.js
+5 -1
@@ -296,11 +296,15 @@ function createFiberImplObject(
296 }
297
298 if (__DEV__) {
299 + // This isn't directly used but is handy for debugging internals:
300 fiber._debugInfo = null;
301 fiber._debugOwner = null;
302 + if (enableOwnerStacks) {
303 + fiber._debugStack = null;
304 + fiber._debugTask = null;
305 + }
306 fiber._debugNeedsRemount = false;
307 fiber._debugHookTypes = null;
303 -
308 if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
309 Object.preventExtensions(fiber);
310 }