@samitouri / QOS-React / commits / d1e604004a

Removed redundant calls to ReactFiberStack.reset()

Brian Vaughn committed Dec 21, 2016 at 17:39 UTC d1e604004a0f820ffcef7b7d023501e9ae017a6d
3 files changed +4 -6
src/renderers/shared/fiber/ReactFiberContext.js
-3
@@ -29,7 +29,6 @@ const {
29 createCursor,
30 pop,
31 push,
32 - reset,
32 } = require('ReactFiberStack');
33
34 if (__DEV__) {
@@ -136,8 +135,6 @@ exports.pushContextProvider = function(workInProgress : Fiber, didPerformWork :
135 };
136
137 exports.resetContext = function() : void {
139 - reset();
140 -
138 contextStackCursor.current = null;
139 didPerformWorkStackCursor.current = false;
140 };
src/renderers/shared/fiber/ReactFiberHostContext.js
-3
@@ -22,7 +22,6 @@ const {
22 createCursor,
23 pop,
24 push,
25 - reset,
25 } = require('ReactFiberStack');
26
27 export type HostContext<C, CX> = {
@@ -114,8 +113,6 @@ module.exports = function<T, P, I, TI, C, CX>(
113 }
114
115 function resetHostContainer() {
117 - reset();
118 -
116 contextStackCursor.current = null;
117 rootInstanceStackCursor.current = null;
118 }
src/renderers/shared/fiber/ReactFiberScheduler.js
+4
@@ -21,6 +21,7 @@ var {
21 isContextProvider,
22 popContextProvider,
23 } = require('ReactFiberContext');
24 +const { reset } = require('ReactFiberStack');
25
26 var ReactFiberBeginWork = require('ReactFiberBeginWork');
27 var ReactFiberCompleteWork = require('ReactFiberCompleteWork');
@@ -159,6 +160,9 @@ module.exports = function<T, P, I, TI, C, CX>(config : HostConfig<T, P, I, TI, C
160 }
161
162 function resetContextStack() {
163 + // Reset the stack
164 + reset();
165 + // Reset the cursors
166 resetContext();
167 resetHostContainer();
168 }