@@ -104,10 +104,10 @@ describe('ReactOwnerStacks', () => {
104104 let i = 0 ;
105105 i <
106106 siblingsBeforeStackOne -
107- // One built-in JSX callsite for the unknown Owner Stack
108- 1 -
109- // <App /> callsite
110- 1 -
107+ // JSX callsites before this are irrelevant since we always reset the limit
108+ // when we start a render. Both <App /> and <UnknownOwner /> were created
109+ // before we actually start rendering.
110+ 0 -
111111 // Stop so that OwnerStackOne will be right before cutoff
112112 1 ;
113113 i ++
@@ -149,8 +149,7 @@ describe('ReactOwnerStacks', () => {
149149 stackOne : normalizeCodeLocInfo ( stackOne ) ,
150150 stackTwo : normalizeCodeLocInfo ( stackTwo ) ,
151151 } ) . toEqual ( {
152- // We continue resetting periodically.
153- pendingTimers : 1 ,
152+ pendingTimers : 0 ,
154153 stackOne : '\n in App (at **)' ,
155154 stackTwo : __VARIANT__
156155 ? // captured right after cutoff
@@ -176,8 +175,7 @@ describe('ReactOwnerStacks', () => {
176175 stackOne : normalizeCodeLocInfo ( stackOne ) ,
177176 stackTwo : normalizeCodeLocInfo ( stackTwo ) ,
178177 } ) . toEqual ( {
179- // We continue resetting periodically.
180- pendingTimers : 1 ,
178+ pendingTimers : 0 ,
181179 // rendered everything before cutoff
182180 stackOne : '\n in App (at **)' ,
183181 stackTwo : '\n in App (at **)' ,
@@ -192,10 +190,10 @@ describe('ReactOwnerStacks', () => {
192190 let i = 0 ;
193191 i <
194192 siblingsBeforeStackOne -
195- // One built-in JSX callsite for the unknown Owner Stack
196- 1 -
197- // <App /> callsite
198- 1 -
193+ // JSX callsites before this are irrelevant since we always reset the limit
194+ // when we start a render. Both <App /> and <UnknownOwner /> were created
195+ // before we actually start rendering.
196+ 0 -
199197 // Stop so that OwnerStackOne will be right before cutoff
200198 1 ;
201199 i ++
@@ -273,8 +271,7 @@ describe('ReactOwnerStacks', () => {
273271 stackOne : normalizeCodeLocInfo ( stackOne ) ,
274272 stackTwo : normalizeCodeLocInfo ( stackTwo ) ,
275273 } ) . toEqual ( {
276- // 1 for periodically resetting the Owner Stack limit
277- pendingTimers : 1 ,
274+ pendingTimers : 0 ,
278275 stackOne : '\n in App (at **)' ,
279276 stackTwo :
280277 // captured after we reset the limit
@@ -295,10 +292,10 @@ describe('ReactOwnerStacks', () => {
295292 let i = 0 ;
296293 i <
297294 siblingsBeforeStackOne -
298- // One built-in JSX callsite for the unknown Owner Stack
299- 1 -
300- // <App /> callsite
301- 1 -
295+ // JSX callsites before this are irrelevant since we always reset the limit
296+ // when we start a render. Both <App /> and <UnknownOwner /> were created
297+ // before we actually start rendering.
298+ 0 -
302299 // Stop so that OwnerStackOne will be right before cutoff
303300 1 ;
304301 i ++
@@ -357,8 +354,7 @@ describe('ReactOwnerStacks', () => {
357354 stackTwo : normalizeCodeLocInfo ( stackTwo ) ,
358355 } ) . toEqual ( {
359356 // 1 for the timeout
360- // 1 for periodically resetting the Owner Stack limit
361- pendingTimers : 2 ,
357+ pendingTimers : 1 ,
362358 stackOne : '\n in App (at **)' ,
363359 stackTwo : undefined ,
364360 } ) ;
@@ -372,8 +368,7 @@ describe('ReactOwnerStacks', () => {
372368 stackOne : normalizeCodeLocInfo ( stackOne ) ,
373369 stackTwo : normalizeCodeLocInfo ( stackTwo ) ,
374370 } ) . toEqual ( {
375- // 1 for periodically resetting the Owner Stack limit
376- pendingTimers : 1 ,
371+ pendingTimers : 0 ,
377372 stackOne : '\n in App (at **)' ,
378373 stackTwo :
379374 // captured after we reset the limit
0 commit comments