Partial React Sync from 241c4467..edab5c074
Summary: - **[edab5c074](https://github.com/facebook/react/commit/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
This commit is contained in:
Родитель
aa0a50c518
Коммит
010c9241cb
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -6015,7 +6015,7 @@ function handleError(root$jscomp$0, thrownValue) {
|
|||
return (
|
||||
(workInProgressRootExitStatus = RootFatalErrored),
|
||||
(workInProgressRootFatalError = thrownValue),
|
||||
null
|
||||
(workInProgress = null)
|
||||
);
|
||||
a: {
|
||||
var root = root$jscomp$0,
|
||||
|
|
|
@ -6006,7 +6006,7 @@ function handleError(root$jscomp$0, thrownValue) {
|
|||
return (
|
||||
(workInProgressRootExitStatus = RootFatalErrored),
|
||||
(workInProgressRootFatalError = thrownValue),
|
||||
null
|
||||
(workInProgress = null)
|
||||
);
|
||||
a: {
|
||||
var root = root$jscomp$0,
|
||||
|
|
|
@ -6090,7 +6090,7 @@ function handleError(root$jscomp$0, thrownValue) {
|
|||
return (
|
||||
(workInProgressRootExitStatus = RootFatalErrored),
|
||||
(workInProgressRootFatalError = thrownValue),
|
||||
null
|
||||
(workInProgress = null)
|
||||
);
|
||||
workInProgress.mode & 8 &&
|
||||
stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !0);
|
||||
|
|
|
@ -6081,7 +6081,7 @@ function handleError(root$jscomp$0, thrownValue) {
|
|||
return (
|
||||
(workInProgressRootExitStatus = RootFatalErrored),
|
||||
(workInProgressRootFatalError = thrownValue),
|
||||
null
|
||||
(workInProgress = null)
|
||||
);
|
||||
workInProgress.mode & 8 &&
|
||||
stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !0);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -6245,7 +6245,7 @@ function handleError(root$jscomp$0, thrownValue) {
|
|||
return (
|
||||
(workInProgressRootExitStatus = RootFatalErrored),
|
||||
(workInProgressRootFatalError = thrownValue),
|
||||
null
|
||||
(workInProgress = null)
|
||||
);
|
||||
a: {
|
||||
var root = root$jscomp$0,
|
||||
|
|
|
@ -6235,7 +6235,7 @@ function handleError(root$jscomp$0, thrownValue) {
|
|||
return (
|
||||
(workInProgressRootExitStatus = RootFatalErrored),
|
||||
(workInProgressRootFatalError = thrownValue),
|
||||
null
|
||||
(workInProgress = null)
|
||||
);
|
||||
a: {
|
||||
var root = root$jscomp$0,
|
||||
|
|
|
@ -6321,7 +6321,7 @@ function handleError(root$jscomp$0, thrownValue) {
|
|||
return (
|
||||
(workInProgressRootExitStatus = RootFatalErrored),
|
||||
(workInProgressRootFatalError = thrownValue),
|
||||
null
|
||||
(workInProgress = null)
|
||||
);
|
||||
workInProgress.mode & 8 &&
|
||||
stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !0);
|
||||
|
|
|
@ -6311,7 +6311,7 @@ function handleError(root$jscomp$0, thrownValue) {
|
|||
return (
|
||||
(workInProgressRootExitStatus = RootFatalErrored),
|
||||
(workInProgressRootFatalError = thrownValue),
|
||||
null
|
||||
(workInProgress = null)
|
||||
);
|
||||
workInProgress.mode & 8 &&
|
||||
stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !0);
|
||||
|
|
Загрузка…
Ссылка в новой задаче