From e01bf78a79b3562f2f6563b150b9c6affee5f2b9 Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Thu, 5 May 2016 15:07:04 -0700 Subject: [PATCH] Move dev-only flags to only exist on composites (#6709) _isOwnerNecessary was unused. --- src/renderers/shared/reconciler/ReactCompositeComponent.js | 4 ++++ src/renderers/shared/reconciler/instantiateReactComponent.js | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/renderers/shared/reconciler/ReactCompositeComponent.js b/src/renderers/shared/reconciler/ReactCompositeComponent.js index 120e5900a4..37d91f1be0 100644 --- a/src/renderers/shared/reconciler/ReactCompositeComponent.js +++ b/src/renderers/shared/reconciler/ReactCompositeComponent.js @@ -169,6 +169,10 @@ var ReactCompositeComponentMixin = { // ComponentWillUnmount shall only be called once this._calledComponentWillUnmount = false; + + if (__DEV__) { + this._warnedAboutRefsInRender = false; + } }, /** diff --git a/src/renderers/shared/reconciler/instantiateReactComponent.js b/src/renderers/shared/reconciler/instantiateReactComponent.js index db22ea3b91..968c2991f7 100644 --- a/src/renderers/shared/reconciler/instantiateReactComponent.js +++ b/src/renderers/shared/reconciler/instantiateReactComponent.js @@ -135,11 +135,6 @@ function instantiateReactComponent(node) { instance._mountIndex = 0; instance._mountImage = null; - if (__DEV__) { - instance._isOwnerNecessary = false; - instance._warnedAboutRefsInRender = false; - } - if (__DEV__) { var debugID = isEmpty ? 0 : nextDebugID++; instance._debugID = debugID;