Skip to content

Commit

Permalink
Partial React Sync from 241c4467..edab5c074
Browse files Browse the repository at this point in the history
Summary:
- **[edab5c074](facebook/react@edab5c074 )**: Re-throw errors thrown by the renderer at the root in the complete phase (#18029) //<Andrew Clark>//

Changelog:
[General][Changed] Partial React Sync from 241c4467..edab5c074

Reviewed By: mdvacca, gaearon

Differential Revision: D19961765

fbshipit-source-id: d4a84a4076da332db76d66ddd7250eaea375f8ff
  • Loading branch information
elicwhite authored and facebook-github-bot committed Feb 19, 2020
1 parent aa0a50c commit 010c924
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 12 deletions.
9 changes: 8 additions & 1 deletion Libraries/Renderer/implementations/ReactFabric-dev.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -20488,7 +20488,14 @@ function handleError(root, thrownValue) {
// supposed to capture all errors that weren't caught by an error
// boundary.
workInProgressRootExitStatus = RootFatalErrored;
workInProgressRootFatalError = thrownValue;
workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
// sibling, or the parent if there are no siblings. But since the root
// has no siblings nor a parent, we set it to null. Usually this is
// handled by `completeUnitOfWork` or `unwindWork`, but since we're
// interntionally not calling those, we need set it here.
// TODO: Consider calling `unwindWork` to pop the contexts.

workInProgress = null;
return null;
}

Expand Down
9 changes: 8 additions & 1 deletion Libraries/Renderer/implementations/ReactFabric-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -20486,7 +20486,14 @@ function handleError(root, thrownValue) {
// supposed to capture all errors that weren't caught by an error
// boundary.
workInProgressRootExitStatus = RootFatalErrored;
workInProgressRootFatalError = thrownValue;
workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
// sibling, or the parent if there are no siblings. But since the root
// has no siblings nor a parent, we set it to null. Usually this is
// handled by `completeUnitOfWork` or `unwindWork`, but since we're
// interntionally not calling those, we need set it here.
// TODO: Consider calling `unwindWork` to pop the contexts.

workInProgress = null;
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion Libraries/Renderer/implementations/ReactFabric-prod.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -6015,7 +6015,7 @@ function handleError(root$jscomp$0, thrownValue) {
return (
(workInProgressRootExitStatus = RootFatalErrored),
(workInProgressRootFatalError = thrownValue),
null
(workInProgress = null)
);
a: {
var root = root$jscomp$0,
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Renderer/implementations/ReactFabric-prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -6006,7 +6006,7 @@ function handleError(root$jscomp$0, thrownValue) {
return (
(workInProgressRootExitStatus = RootFatalErrored),
(workInProgressRootFatalError = thrownValue),
null
(workInProgress = null)
);
a: {
var root = root$jscomp$0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6090,7 +6090,7 @@ function handleError(root$jscomp$0, thrownValue) {
return (
(workInProgressRootExitStatus = RootFatalErrored),
(workInProgressRootFatalError = thrownValue),
null
(workInProgress = null)
);
workInProgress.mode & 8 &&
stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6081,7 +6081,7 @@ function handleError(root$jscomp$0, thrownValue) {
return (
(workInProgressRootExitStatus = RootFatalErrored),
(workInProgressRootFatalError = thrownValue),
null
(workInProgress = null)
);
workInProgress.mode & 8 &&
stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20791,7 +20791,14 @@ function handleError(root, thrownValue) {
// supposed to capture all errors that weren't caught by an error
// boundary.
workInProgressRootExitStatus = RootFatalErrored;
workInProgressRootFatalError = thrownValue;
workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
// sibling, or the parent if there are no siblings. But since the root
// has no siblings nor a parent, we set it to null. Usually this is
// handled by `completeUnitOfWork` or `unwindWork`, but since we're
// interntionally not calling those, we need set it here.
// TODO: Consider calling `unwindWork` to pop the contexts.

workInProgress = null;
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20789,7 +20789,14 @@ function handleError(root, thrownValue) {
// supposed to capture all errors that weren't caught by an error
// boundary.
workInProgressRootExitStatus = RootFatalErrored;
workInProgressRootFatalError = thrownValue;
workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
// sibling, or the parent if there are no siblings. But since the root
// has no siblings nor a parent, we set it to null. Usually this is
// handled by `completeUnitOfWork` or `unwindWork`, but since we're
// interntionally not calling those, we need set it here.
// TODO: Consider calling `unwindWork` to pop the contexts.

workInProgress = null;
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6245,7 +6245,7 @@ function handleError(root$jscomp$0, thrownValue) {
return (
(workInProgressRootExitStatus = RootFatalErrored),
(workInProgressRootFatalError = thrownValue),
null
(workInProgress = null)
);
a: {
var root = root$jscomp$0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6235,7 +6235,7 @@ function handleError(root$jscomp$0, thrownValue) {
return (
(workInProgressRootExitStatus = RootFatalErrored),
(workInProgressRootFatalError = thrownValue),
null
(workInProgress = null)
);
a: {
var root = root$jscomp$0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6321,7 +6321,7 @@ function handleError(root$jscomp$0, thrownValue) {
return (
(workInProgressRootExitStatus = RootFatalErrored),
(workInProgressRootFatalError = thrownValue),
null
(workInProgress = null)
);
workInProgress.mode & 8 &&
stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6311,7 +6311,7 @@ function handleError(root$jscomp$0, thrownValue) {
return (
(workInProgressRootExitStatus = RootFatalErrored),
(workInProgressRootFatalError = thrownValue),
null
(workInProgress = null)
);
workInProgress.mode & 8 &&
stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !0);
Expand Down

0 comments on commit 010c924

Please sign in to comment.