@samitouri / QOS-React / commits / bde4b1659f

Delete ReactPerf and ReactDebugTool Stubs (#12809)

Timothy Yung committed May 14, 2018 at 20:28 UTC bde4b1659fd4aea796482f24d40c2e834fca635f
5 files changed -81
packages/react-native-renderer/src/ReactFabric.js
-22
@@ -118,28 +118,6 @@ const ReactFabric: ReactFabricType = {
118 },
119 };
120
121 -if (__DEV__) {
122 - // $FlowFixMe
123 - Object.assign(
124 - ReactFabric.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
125 - {
126 - // TODO: none of these work since Fiber. Remove these dependencies.
127 - // Used by RCTRenderingPerf, Systrace:
128 - ReactDebugTool: {
129 - addHook() {},
130 - removeHook() {},
131 - },
132 - // Used by ReactPerfStallHandler, RCTRenderingPerf:
133 - ReactPerf: {
134 - start() {},
135 - stop() {},
136 - printInclusive() {},
137 - printWasted() {},
138 - },
139 - },
140 - );
141 -}
142 -
121 ReactFabricRenderer.injectIntoDevTools({
122 findFiberByHostInstance: ReactNativeComponentTree.getClosestInstanceFromNode,
123 getInspectorDataForViewTag: getInspectorDataForViewTag,
packages/react-native-renderer/src/ReactNativeRenderer.js
-22
@@ -147,28 +147,6 @@ const ReactNativeRenderer: ReactNativeType = {
147 },
148 };
149
150 -if (__DEV__) {
151 - // $FlowFixMe
152 - Object.assign(
153 - ReactNativeRenderer.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
154 - {
155 - // TODO: none of these work since Fiber. Remove these dependencies.
156 - // Used by RCTRenderingPerf, Systrace:
157 - ReactDebugTool: {
158 - addHook() {},
159 - removeHook() {},
160 - },
161 - // Used by ReactPerfStallHandler, RCTRenderingPerf:
162 - ReactPerf: {
163 - start() {},
164 - stop() {},
165 - printInclusive() {},
166 - printWasted() {},
167 - },
168 - },
169 - );
170 -}
171 -
150 ReactNativeFiberRenderer.injectIntoDevTools({
151 findFiberByHostInstance: ReactNativeComponentTree.getClosestInstanceFromNode,
152 getInspectorDataForViewTag: getInspectorDataForViewTag,
packages/react-native-renderer/src/ReactNativeTypes.js
-2
@@ -89,9 +89,7 @@ export type NativeMethodsMixinType = {
89
90 type SecretInternalsType = {
91 NativeMethodsMixin: NativeMethodsMixinType,
92 - ReactDebugTool?: any,
92 ReactNativeComponentTree: any,
94 - ReactPerf?: any,
93 computeComponentStackForErrorReporting(tag: number): string,
94 // TODO (bvaughn) Decide which additional types to expose here?
95 // And how much information to fill in for the above types.
scripts/rollup/shims/react-native/ReactDebugTool.js deleted
-18
@@ -1,18 +0,0 @@
1 -/**
2 - * Copyright (c) 2013-present, Facebook, Inc.
3 - *
4 - * This source code is licensed under the MIT license found in the
5 - * LICENSE file in the root directory of this source tree.
6 - *
7 - * @format
8 - * @flow
9 - */
10 -
11 -'use strict';
12 -
13 -const {
14 - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
15 -} = require('ReactNative');
16 -
17 -module.exports =
18 - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactDebugTool;
scripts/rollup/shims/react-native/ReactPerf.js deleted
-17
@@ -1,17 +0,0 @@
1 -/**
2 - * Copyright (c) 2013-present, Facebook, Inc.
3 - *
4 - * This source code is licensed under the MIT license found in the
5 - * LICENSE file in the root directory of this source tree.
6 - *
7 - * @format
8 - * @flow
9 - */
10 -
11 -'use strict';
12 -
13 -const {
14 - __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
15 -} = require('ReactNative');
16 -
17 -module.exports = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactPerf;