Skip to content

Commit f64ff30

Browse files
committed
Only continue the work loop if the error was successfully captured
1 parent 7f41ad5 commit f64ff30

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

scripts/fiber/tests-failing.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,6 @@ src/renderers/shared/__tests__/ReactPerf-test.js
291291
* should not count time in a portal towards lifecycle method
292292
* should work when measurement starts during reconciliation
293293

294-
src/renderers/shared/fiber/__tests__/ReactIncremental-test.js
295-
* can handle if setState callback throws
296-
297294
src/renderers/shared/hooks/__tests__/ReactComponentTreeHook-test.js
298295
* uses displayName or Unknown for classic components
299296
* uses displayName, name, or ReactComponent for modern components
@@ -393,6 +390,7 @@ src/renderers/shared/stack/reconciler/__tests__/ReactComponent-test.js
393390
* should support new-style refs with mixed-up owners
394391
* should call refs at the correct time
395392
* fires the callback after a component is rendered
393+
* throws usefully when rendering badly-typed elements
396394

397395
src/renderers/shared/stack/reconciler/__tests__/ReactComponentLifeCycle-test.js
398396
* should carry through each of the phases of setup

scripts/fiber/tests-passing.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,7 @@ src/renderers/shared/fiber/__tests__/ReactIncremental-test.js
830830
* skips will/DidUpdate when bailing unless an update was already in progress
831831
* performs batched updates at the end of the batch
832832
* can nest batchedUpdates
833+
* can handle if setState callback throws
833834
* merges and masks context
834835
* does not leak own context into context provider
835836
* provides context when reusing work

src/renderers/shared/fiber/ReactFiberScheduler.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,10 @@ module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>) {
543543
unwindContext(failedWork, boundary);
544544
}
545545
nextUnitOfWork = completeUnitOfWork(boundary);
546+
547+
// We were interupted by an error. Continue performing work.
548+
shouldContinue = true;
546549
}
547-
// We were interupted by an error. Continue performing work.
548-
shouldContinue = true;
549550
} finally {
550551
shouldBatchUpdates = prevShouldBatchUpdates;
551552
}

src/renderers/shared/stack/reconciler/__tests__/ReactComponent-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ describe('ReactComponent', () => {
328328
expect(callback.mock.calls.length).toBe(3);
329329
});
330330

331-
xit('throws usefully when rendering badly-typed elements', () => {
331+
it('throws usefully when rendering badly-typed elements', () => {
332332
spyOn(console, 'error');
333333

334334
var X = undefined;

0 commit comments

Comments
 (0)