From e246c05ebfca6c5a52b610f27cfddd07033d59f6 Mon Sep 17 00:00:00 2001 From: acdlite Date: Wed, 22 Feb 2023 20:37:03 +0000 Subject: [PATCH] Remove eventTime field from class Update type (#26219) `eventTime` is a vestigial field that can be cleaned up. It was originally used as part of the starvation mechanism but it's since been replaced by a per-lane field on the root. This is a part of a series of smaller refactors I'm doing to simplify/speed up the `setState` path, related to the Sync Unification project that @tyao1 has been working on. DiffTrain build for commit c04b18070145b82111e1162729f4776f4d2c6112. --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/REVISION_TRANSFORMS | 2 +- compiled/facebook-www/React-dev.classic.js | 2 +- compiled/facebook-www/React-dev.modern.js | 2 +- compiled/facebook-www/React-prod.classic.js | 2 +- compiled/facebook-www/React-prod.modern.js | 2 +- .../facebook-www/React-profiling.classic.js | 2 +- .../facebook-www/React-profiling.modern.js | 2 +- compiled/facebook-www/ReactART-dev.classic.js | 40 +++---- compiled/facebook-www/ReactART-dev.modern.js | 40 +++---- .../facebook-www/ReactART-prod.classic.js | 84 ++++++------- compiled/facebook-www/ReactART-prod.modern.js | 86 ++++++-------- compiled/facebook-www/ReactDOM-dev.classic.js | 44 +++---- compiled/facebook-www/ReactDOM-dev.modern.js | 44 +++---- .../facebook-www/ReactDOM-prod.classic.js | 102 +++++++--------- compiled/facebook-www/ReactDOM-prod.modern.js | 111 +++++++----------- .../ReactDOM-profiling.classic.js | 102 +++++++--------- .../facebook-www/ReactDOM-profiling.modern.js | 111 +++++++----------- .../ReactDOMServer-dev.classic.js | 2 +- .../facebook-www/ReactDOMServer-dev.modern.js | 2 +- .../ReactDOMServer-prod.classic.js | 2 +- .../ReactDOMServer-prod.modern.js | 2 +- .../ReactDOMTesting-dev.classic.js | 44 +++---- .../ReactDOMTesting-dev.modern.js | 44 +++---- .../ReactDOMTesting-prod.classic.js | 102 +++++++--------- .../ReactDOMTesting-prod.modern.js | 111 +++++++----------- .../ReactTestRenderer-dev.classic.js | 40 +++---- .../ReactTestRenderer-dev.modern.js | 40 +++---- 28 files changed, 494 insertions(+), 675 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 02264c1d183cb..fb174cf98fcfd 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -212b89fa25fd0a39473e845d1665d45f9da9dad3 +c04b18070145b82111e1162729f4776f4d2c6112 diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index 02264c1d183cb..fb174cf98fcfd 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -212b89fa25fd0a39473e845d1665d45f9da9dad3 +c04b18070145b82111e1162729f4776f4d2c6112 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 4c1dffbca591a..bf919cdd8eedd 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-www-classic-212b89fa2-20230221"; +var ReactVersion = "18.3.0-www-classic-c04b18070-20230222"; // ATTENTION // When adding new symbols to this file, diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index aa84fc27090cb..1a5dfb7cf1c52 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-www-modern-212b89fa2-20230221"; +var ReactVersion = "18.3.0-www-modern-c04b18070-20230222"; // ATTENTION // When adding new symbols to this file, diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index b834477a5b7b7..422d04012e193 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -646,4 +646,4 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-classic-212b89fa2-20230221"; +exports.version = "18.3.0-www-classic-c04b18070-20230222"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 8bbb8372b548b..77db73b81b058 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -638,4 +638,4 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-modern-212b89fa2-20230221"; +exports.version = "18.3.0-www-modern-c04b18070-20230222"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 3f910591267be..c8c54bc0af851 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -657,7 +657,7 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-classic-212b89fa2-20230221"; +exports.version = "18.3.0-www-classic-c04b18070-20230222"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index d2bc778c65d19..1bf6655fb3412 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -649,7 +649,7 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-modern-212b89fa2-20230221"; +exports.version = "18.3.0-www-modern-c04b18070-20230222"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 85dfb294d0fb4..7b7fcd75ced5f 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -69,7 +69,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = "18.3.0-www-classic-212b89fa2-20230221"; +var ReactVersion = "18.3.0-www-classic-c04b18070-20230222"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -4321,9 +4321,8 @@ function cloneUpdateQueue(current, workInProgress) { workInProgress.updateQueue = clone; } } -function createUpdate(eventTime, lane) { +function createUpdate(lane) { var update = { - eventTime: eventTime, lane: lane, tag: UpdateState, payload: null, @@ -4439,7 +4438,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { do { var clone = { - eventTime: update.eventTime, lane: update.lane, tag: update.tag, payload: update.payload, @@ -4652,11 +4650,9 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { var update = firstBaseUpdate; do { - // TODO: Don't need this field anymore - var updateEventTime = update.eventTime; // An extra OffscreenLane bit is added to updates that were made to + // An extra OffscreenLane bit is added to updates that were made to // a hidden tree, so that we can distinguish them from updates that were // already there when the tree was hidden. - var updateLane = removeLanes(update.lane, OffscreenLane); var isHiddenUpdate = updateLane !== update.lane; // Check if this update was made while the tree was hidden. If so, then // it's not a "base" update and we should disregard the extra base lanes @@ -4671,7 +4667,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // skipped update, the previous update/state is the new base // update/state. var clone = { - eventTime: updateEventTime, lane: updateLane, tag: update.tag, payload: update.payload, @@ -4691,7 +4686,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // This update does have sufficient priority. if (newLastBaseUpdate !== null) { var _clone = { - eventTime: updateEventTime, // This update is going to be committed so we never want uncommit // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. @@ -9302,11 +9296,11 @@ function refreshCache(fiber, seedKey, seedValue) { case HostRoot: { // Schedule an update on the cache boundary to trigger a refresh. var lane = requestUpdateLane(provider); - var eventTime = requestEventTime(); - var refreshUpdate = createUpdate(eventTime, lane); + var refreshUpdate = createUpdate(lane); var root = enqueueUpdate(provider, refreshUpdate, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, provider, lane, eventTime); entangleTransitions(root, provider, lane); } // TODO: If a refresh never commits, the new cache created here must be @@ -10915,9 +10909,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueSetState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.payload = payload; if (callback !== undefined && callback !== null) { @@ -10931,6 +10924,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -10950,9 +10944,8 @@ var classComponentUpdater = { }, enqueueReplaceState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ReplaceState; update.payload = payload; @@ -10967,6 +10960,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -10987,9 +10981,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueForceUpdate: function (inst, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; if (callback !== undefined && callback !== null) { @@ -11003,6 +10996,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -12078,7 +12072,7 @@ function logCapturedError(boundary, errorInfo) { } function createRootErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null. + var update = createUpdate(lane); // Unmount the root by rendering null. update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property // being called "element". @@ -12097,7 +12091,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { } function createClassErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = CaptureUpdate; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; @@ -12257,7 +12251,7 @@ function markSuspenseBoundaryShouldCapture( // When we try rendering again, we should not reuse the current fiber, // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. - var update = createUpdate(NoTimestamp, SyncLane); + var update = createUpdate(SyncLane); update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } @@ -16444,7 +16438,7 @@ function propagateContextChange_eager(workInProgress, context, renderLanes) { if (fiber.tag === ClassComponent) { // Schedule a force update on the work-in-progress. var lane = pickArbitraryLane(renderLanes); - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the // update to the current fiber, too, which means it will persist even if // this render is thrown away. Since it's a race condition, not sure it's @@ -27517,7 +27511,6 @@ function updateContainer(element, container, parentComponent, callback) { } var current$1 = container.current; - var eventTime = requestEventTime(); var lane = requestUpdateLane(current$1); if (enableSchedulingProfiler) { @@ -27546,7 +27539,7 @@ function updateContainer(element, container, parentComponent, callback) { } } - var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property + var update = createUpdate(lane); // Caution: React DevTools currently depends on this property // being called "element". update.payload = { @@ -27571,6 +27564,7 @@ function updateContainer(element, container, parentComponent, callback) { var root = enqueueUpdate(current$1, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, current$1, lane, eventTime); entangleTransitions(root, current$1, lane); } diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 706cfa886c73b..0dbc47562f9a4 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -69,7 +69,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = "18.3.0-www-modern-212b89fa2-20230221"; +var ReactVersion = "18.3.0-www-modern-c04b18070-20230222"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -4077,9 +4077,8 @@ function cloneUpdateQueue(current, workInProgress) { workInProgress.updateQueue = clone; } } -function createUpdate(eventTime, lane) { +function createUpdate(lane) { var update = { - eventTime: eventTime, lane: lane, tag: UpdateState, payload: null, @@ -4195,7 +4194,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { do { var clone = { - eventTime: update.eventTime, lane: update.lane, tag: update.tag, payload: update.payload, @@ -4408,11 +4406,9 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { var update = firstBaseUpdate; do { - // TODO: Don't need this field anymore - var updateEventTime = update.eventTime; // An extra OffscreenLane bit is added to updates that were made to + // An extra OffscreenLane bit is added to updates that were made to // a hidden tree, so that we can distinguish them from updates that were // already there when the tree was hidden. - var updateLane = removeLanes(update.lane, OffscreenLane); var isHiddenUpdate = updateLane !== update.lane; // Check if this update was made while the tree was hidden. If so, then // it's not a "base" update and we should disregard the extra base lanes @@ -4427,7 +4423,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // skipped update, the previous update/state is the new base // update/state. var clone = { - eventTime: updateEventTime, lane: updateLane, tag: update.tag, payload: update.payload, @@ -4447,7 +4442,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // This update does have sufficient priority. if (newLastBaseUpdate !== null) { var _clone = { - eventTime: updateEventTime, // This update is going to be committed so we never want uncommit // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. @@ -9058,11 +9052,11 @@ function refreshCache(fiber, seedKey, seedValue) { case HostRoot: { // Schedule an update on the cache boundary to trigger a refresh. var lane = requestUpdateLane(provider); - var eventTime = requestEventTime(); - var refreshUpdate = createUpdate(eventTime, lane); + var refreshUpdate = createUpdate(lane); var root = enqueueUpdate(provider, refreshUpdate, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, provider, lane, eventTime); entangleTransitions(root, provider, lane); } // TODO: If a refresh never commits, the new cache created here must be @@ -10669,9 +10663,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueSetState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.payload = payload; if (callback !== undefined && callback !== null) { @@ -10685,6 +10678,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -10704,9 +10698,8 @@ var classComponentUpdater = { }, enqueueReplaceState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ReplaceState; update.payload = payload; @@ -10721,6 +10714,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -10741,9 +10735,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueForceUpdate: function (inst, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; if (callback !== undefined && callback !== null) { @@ -10757,6 +10750,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -11800,7 +11794,7 @@ function logCapturedError(boundary, errorInfo) { } function createRootErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null. + var update = createUpdate(lane); // Unmount the root by rendering null. update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property // being called "element". @@ -11819,7 +11813,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { } function createClassErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = CaptureUpdate; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; @@ -11979,7 +11973,7 @@ function markSuspenseBoundaryShouldCapture( // When we try rendering again, we should not reuse the current fiber, // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. - var update = createUpdate(NoTimestamp, SyncLane); + var update = createUpdate(SyncLane); update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } @@ -16133,7 +16127,7 @@ function propagateContextChange_eager(workInProgress, context, renderLanes) { if (fiber.tag === ClassComponent) { // Schedule a force update on the work-in-progress. var lane = pickArbitraryLane(renderLanes); - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the // update to the current fiber, too, which means it will persist even if // this render is thrown away. Since it's a race condition, not sure it's @@ -27177,7 +27171,6 @@ function updateContainer(element, container, parentComponent, callback) { } var current$1 = container.current; - var eventTime = requestEventTime(); var lane = requestUpdateLane(current$1); if (enableSchedulingProfiler) { @@ -27206,7 +27199,7 @@ function updateContainer(element, container, parentComponent, callback) { } } - var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property + var update = createUpdate(lane); // Caution: React DevTools currently depends on this property // being called "element". update.payload = { @@ -27231,6 +27224,7 @@ function updateContainer(element, container, parentComponent, callback) { var root = enqueueUpdate(current$1, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, current$1, lane, eventTime); entangleTransitions(root, current$1, lane); } diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 8bb97602997c3..a27641df1bc96 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -1140,15 +1140,8 @@ function cloneUpdateQueue(current, workInProgress) { callbacks: null }); } -function createUpdate(eventTime, lane) { - return { - eventTime: eventTime, - lane: lane, - tag: 0, - payload: null, - callback: null, - next: null - }; +function createUpdate(lane) { + return { lane: lane, tag: 0, payload: null, callback: null, next: null }; } function enqueueUpdate(fiber, update, lane) { var updateQueue = fiber.updateQueue; @@ -1194,7 +1187,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { if (null !== queue) { do { var clone = { - eventTime: queue.eventTime, lane: queue.lane, tag: queue.tag, payload: queue.payload, @@ -1229,7 +1221,7 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { function processUpdateQueue( workInProgress$jscomp$0, props, - instance, + instance$jscomp$0, renderLanes ) { var queue = workInProgress$jscomp$0.updateQueue; @@ -1262,8 +1254,7 @@ function processUpdateQueue( current = firstPendingUpdate = lastPendingUpdate = null; pendingQueue = firstBaseUpdate; do { - var updateEventTime = pendingQueue.eventTime, - updateLane = pendingQueue.lane & -1073741825, + var updateLane = pendingQueue.lane & -1073741825, isHiddenUpdate = updateLane !== pendingQueue.lane; if ( isHiddenUpdate @@ -1273,7 +1264,6 @@ function processUpdateQueue( null !== current && (current = current.next = { - eventTime: updateEventTime, lane: 0, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -1284,16 +1274,12 @@ function processUpdateQueue( var workInProgress = workInProgress$jscomp$0, update = pendingQueue; updateLane = props; - updateEventTime = instance; + var instance = instance$jscomp$0; switch (update.tag) { case 1: workInProgress = update.payload; if ("function" === typeof workInProgress) { - newState = workInProgress.call( - updateEventTime, - newState, - updateLane - ); + newState = workInProgress.call(instance, newState, updateLane); break a; } newState = workInProgress; @@ -1304,7 +1290,7 @@ function processUpdateQueue( workInProgress = update.payload; updateLane = "function" === typeof workInProgress - ? workInProgress.call(updateEventTime, newState, updateLane) + ? workInProgress.call(instance, newState, updateLane) : workInProgress; if (null === updateLane || void 0 === updateLane) break a; newState = assign({}, newState, updateLane); @@ -1323,7 +1309,6 @@ function processUpdateQueue( : isHiddenUpdate.push(updateLane)); } else (isHiddenUpdate = { - eventTime: updateEventTime, lane: updateLane, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -2860,13 +2845,14 @@ function refreshCache(fiber, seedKey, seedValue) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider), - eventTime = requestEventTime(); - fiber = createUpdate(eventTime, lane); + var lane = requestUpdateLane(provider); + fiber = createUpdate(lane); var root = enqueueUpdate(provider, fiber, lane); - null !== root && - (scheduleUpdateOnFiber(root, provider, lane, eventTime), - entangleTransitions(root, provider, lane)); + if (null !== root) { + var eventTime = requestEventTime(); + scheduleUpdateOnFiber(root, provider, lane, eventTime); + entangleTransitions(root, provider, lane); + } provider = createCache(); null !== seedKey && void 0 !== seedKey && @@ -3218,39 +3204,39 @@ var classComponentUpdater = { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 1; update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 2; void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - (scheduleUpdateOnFiber(callback, inst, lane, eventTime), + ((update = requestEventTime()), + scheduleUpdateOnFiber(callback, inst, lane, update), entangleTransitions(callback, inst, lane)); } }; @@ -3390,7 +3376,7 @@ function logCapturedError(boundary, errorInfo) { } } function createRootErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; lane.payload = { element: null }; var error = errorInfo.value; @@ -3401,7 +3387,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { return lane; } function createClassErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; if ("function" === typeof getDerivedStateFromError) { @@ -4812,7 +4798,7 @@ function propagateContextChange(workInProgress, context, renderLanes) { for (var dependency = list.firstContext; null !== dependency; ) { if (dependency.context === context) { if (1 === fiber.tag) { - dependency = createUpdate(-1, renderLanes & -renderLanes); + dependency = createUpdate(renderLanes & -renderLanes); dependency.tag = 2; var updateQueue = fiber.updateQueue; if (null !== updateQueue) { @@ -8413,7 +8399,7 @@ function unwindSuspendedUnitOfWork(unitOfWork, thrownValue) { if (1 === unitOfWork.tag) if (null === unitOfWork.alternate) unitOfWork.tag = 17; else { - var update = createUpdate(-1, 2); + var update = createUpdate(2); update.tag = 2; enqueueUpdate(unitOfWork, update, 2); } @@ -9621,7 +9607,6 @@ function FiberRootNode( } function updateContainer(element, container, parentComponent, callback) { var current = container.current, - eventTime = requestEventTime(), lane = requestUpdateLane(current); a: if (parentComponent) { parentComponent = parentComponent._reactInternals; @@ -9666,13 +9651,14 @@ function updateContainer(element, container, parentComponent, callback) { null === container.context ? (container.context = parentComponent) : (container.pendingContext = parentComponent); - container = createUpdate(eventTime, lane); + container = createUpdate(lane); container.payload = { element: element }; callback = void 0 === callback ? null : callback; null !== callback && (container.callback = callback); element = enqueueUpdate(current, container, lane); null !== element && - (scheduleUpdateOnFiber(element, current, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(element, current, lane, callback), entangleTransitions(element, current, lane)); return lane; } @@ -9800,7 +9786,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "18.3.0-www-classic-212b89fa2-20230221", + version: "18.3.0-www-classic-c04b18070-20230222", rendererPackageName: "react-art" }; var internals$jscomp$inline_1301 = { @@ -9831,7 +9817,7 @@ var internals$jscomp$inline_1301 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-212b89fa2-20230221" + reconcilerVersion: "18.3.0-next-c04b18070-20230222" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1302 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 2c3c2da0fd759..a5427fca48bac 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -946,15 +946,8 @@ function cloneUpdateQueue(current, workInProgress) { callbacks: null }); } -function createUpdate(eventTime, lane) { - return { - eventTime: eventTime, - lane: lane, - tag: 0, - payload: null, - callback: null, - next: null - }; +function createUpdate(lane) { + return { lane: lane, tag: 0, payload: null, callback: null, next: null }; } function enqueueUpdate(fiber, update, lane) { var updateQueue = fiber.updateQueue; @@ -1000,7 +993,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { if (null !== queue) { do { var clone = { - eventTime: queue.eventTime, lane: queue.lane, tag: queue.tag, payload: queue.payload, @@ -1035,7 +1027,7 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { function processUpdateQueue( workInProgress$jscomp$0, props, - instance, + instance$jscomp$0, renderLanes ) { var queue = workInProgress$jscomp$0.updateQueue; @@ -1068,8 +1060,7 @@ function processUpdateQueue( current = firstPendingUpdate = lastPendingUpdate = null; pendingQueue = firstBaseUpdate; do { - var updateEventTime = pendingQueue.eventTime, - updateLane = pendingQueue.lane & -1073741825, + var updateLane = pendingQueue.lane & -1073741825, isHiddenUpdate = updateLane !== pendingQueue.lane; if ( isHiddenUpdate @@ -1079,7 +1070,6 @@ function processUpdateQueue( null !== current && (current = current.next = { - eventTime: updateEventTime, lane: 0, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -1090,16 +1080,12 @@ function processUpdateQueue( var workInProgress = workInProgress$jscomp$0, update = pendingQueue; updateLane = props; - updateEventTime = instance; + var instance = instance$jscomp$0; switch (update.tag) { case 1: workInProgress = update.payload; if ("function" === typeof workInProgress) { - newState = workInProgress.call( - updateEventTime, - newState, - updateLane - ); + newState = workInProgress.call(instance, newState, updateLane); break a; } newState = workInProgress; @@ -1110,7 +1096,7 @@ function processUpdateQueue( workInProgress = update.payload; updateLane = "function" === typeof workInProgress - ? workInProgress.call(updateEventTime, newState, updateLane) + ? workInProgress.call(instance, newState, updateLane) : workInProgress; if (null === updateLane || void 0 === updateLane) break a; newState = assign({}, newState, updateLane); @@ -1129,7 +1115,6 @@ function processUpdateQueue( : isHiddenUpdate.push(updateLane)); } else (isHiddenUpdate = { - eventTime: updateEventTime, lane: updateLane, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -2666,13 +2651,14 @@ function refreshCache(fiber, seedKey, seedValue) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider), - eventTime = requestEventTime(); - fiber = createUpdate(eventTime, lane); + var lane = requestUpdateLane(provider); + fiber = createUpdate(lane); var root = enqueueUpdate(provider, fiber, lane); - null !== root && - (scheduleUpdateOnFiber(root, provider, lane, eventTime), - entangleTransitions(root, provider, lane)); + if (null !== root) { + var eventTime = requestEventTime(); + scheduleUpdateOnFiber(root, provider, lane, eventTime); + entangleTransitions(root, provider, lane); + } provider = createCache(); null !== seedKey && void 0 !== seedKey && @@ -3024,39 +3010,39 @@ var classComponentUpdater = { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 1; update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 2; void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - (scheduleUpdateOnFiber(callback, inst, lane, eventTime), + ((update = requestEventTime()), + scheduleUpdateOnFiber(callback, inst, lane, update), entangleTransitions(callback, inst, lane)); } }; @@ -3181,7 +3167,7 @@ function logCapturedError(boundary, errorInfo) { } } function createRootErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; lane.payload = { element: null }; var error = errorInfo.value; @@ -3192,7 +3178,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { return lane; } function createClassErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; if ("function" === typeof getDerivedStateFromError) { @@ -4563,7 +4549,7 @@ function propagateContextChange(workInProgress, context, renderLanes) { for (var dependency = list.firstContext; null !== dependency; ) { if (dependency.context === context) { if (1 === fiber.tag) { - dependency = createUpdate(-1, renderLanes & -renderLanes); + dependency = createUpdate(renderLanes & -renderLanes); dependency.tag = 2; var updateQueue = fiber.updateQueue; if (null !== updateQueue) { @@ -8145,7 +8131,7 @@ function unwindSuspendedUnitOfWork(unitOfWork, thrownValue) { if (1 === unitOfWork.tag) if (null === unitOfWork.alternate) unitOfWork.tag = 17; else { - var update = createUpdate(-1, 2); + var update = createUpdate(2); update.tag = 2; enqueueUpdate(unitOfWork, update, 2); } @@ -9326,18 +9312,18 @@ function FiberRootNode( } function updateContainer(element, container, parentComponent, callback) { parentComponent = container.current; - var eventTime = requestEventTime(), - lane = requestUpdateLane(parentComponent); + var lane = requestUpdateLane(parentComponent); null === container.context ? (container.context = emptyContextObject) : (container.pendingContext = emptyContextObject); - container = createUpdate(eventTime, lane); + container = createUpdate(lane); container.payload = { element: element }; callback = void 0 === callback ? null : callback; null !== callback && (container.callback = callback); element = enqueueUpdate(parentComponent, container, lane); null !== element && - (scheduleUpdateOnFiber(element, parentComponent, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(element, parentComponent, lane, callback), entangleTransitions(element, parentComponent, lane)); return lane; } @@ -9465,7 +9451,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "18.3.0-www-modern-212b89fa2-20230221", + version: "18.3.0-www-modern-c04b18070-20230222", rendererPackageName: "react-art" }; var internals$jscomp$inline_1281 = { @@ -9496,7 +9482,7 @@ var internals$jscomp$inline_1281 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-212b89fa2-20230221" + reconcilerVersion: "18.3.0-next-c04b18070-20230222" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1282 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 76220bc130ad0..ba69c894f6b68 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -18064,9 +18064,8 @@ function cloneUpdateQueue(current, workInProgress) { workInProgress.updateQueue = clone; } } -function createUpdate(eventTime, lane) { +function createUpdate(lane) { var update = { - eventTime: eventTime, lane: lane, tag: UpdateState, payload: null, @@ -18182,7 +18181,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { do { var clone = { - eventTime: update.eventTime, lane: update.lane, tag: update.tag, payload: update.payload, @@ -18395,11 +18393,9 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { var update = firstBaseUpdate; do { - // TODO: Don't need this field anymore - var updateEventTime = update.eventTime; // An extra OffscreenLane bit is added to updates that were made to + // An extra OffscreenLane bit is added to updates that were made to // a hidden tree, so that we can distinguish them from updates that were // already there when the tree was hidden. - var updateLane = removeLanes(update.lane, OffscreenLane); var isHiddenUpdate = updateLane !== update.lane; // Check if this update was made while the tree was hidden. If so, then // it's not a "base" update and we should disregard the extra base lanes @@ -18414,7 +18410,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // skipped update, the previous update/state is the new base // update/state. var clone = { - eventTime: updateEventTime, lane: updateLane, tag: update.tag, payload: update.payload, @@ -18434,7 +18429,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // This update does have sufficient priority. if (newLastBaseUpdate !== null) { var _clone = { - eventTime: updateEventTime, // This update is going to be committed so we never want uncommit // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. @@ -22917,11 +22911,11 @@ function refreshCache(fiber, seedKey, seedValue) { case HostRoot: { // Schedule an update on the cache boundary to trigger a refresh. var lane = requestUpdateLane(provider); - var eventTime = requestEventTime(); - var refreshUpdate = createUpdate(eventTime, lane); + var refreshUpdate = createUpdate(lane); var root = enqueueUpdate(provider, refreshUpdate, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, provider, lane, eventTime); entangleTransitions(root, provider, lane); } // TODO: If a refresh never commits, the new cache created here must be @@ -24530,9 +24524,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueSetState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.payload = payload; if (callback !== undefined && callback !== null) { @@ -24546,6 +24539,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -24565,9 +24559,8 @@ var classComponentUpdater = { }, enqueueReplaceState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ReplaceState; update.payload = payload; @@ -24582,6 +24575,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -24602,9 +24596,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueForceUpdate: function (inst, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; if (callback !== undefined && callback !== null) { @@ -24618,6 +24611,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -25693,7 +25687,7 @@ function logCapturedError(boundary, errorInfo) { } function createRootErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null. + var update = createUpdate(lane); // Unmount the root by rendering null. update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property // being called "element". @@ -25712,7 +25706,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { } function createClassErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = CaptureUpdate; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; @@ -25872,7 +25866,7 @@ function markSuspenseBoundaryShouldCapture( // When we try rendering again, we should not reuse the current fiber, // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. - var update = createUpdate(NoTimestamp, SyncLane); + var update = createUpdate(SyncLane); update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } @@ -30389,7 +30383,7 @@ function propagateContextChange_eager(workInProgress, context, renderLanes) { if (fiber.tag === ClassComponent) { // Schedule a force update on the work-in-progress. var lane = pickArbitraryLane(renderLanes); - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the // update to the current fiber, too, which means it will persist even if // this render is thrown away. Since it's a race condition, not sure it's @@ -41996,7 +41990,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-212b89fa2-20230221"; +var ReactVersion = "18.3.0-www-classic-c04b18070-20230222"; function createPortal$1( children, @@ -42178,11 +42172,11 @@ function createHydrationContainer( // enqueue the callback if one is provided). var current = root.current; - var eventTime = requestEventTime(); var lane = requestUpdateLane(current); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.callback = callback !== undefined && callback !== null ? callback : null; + var eventTime = requestEventTime(); enqueueUpdate(current, update, lane); scheduleInitialHydrationOnRoot(root, lane, eventTime); return root; @@ -42193,7 +42187,6 @@ function updateContainer(element, container, parentComponent, callback) { } var current$1 = container.current; - var eventTime = requestEventTime(); var lane = requestUpdateLane(current$1); if (enableSchedulingProfiler) { @@ -42222,7 +42215,7 @@ function updateContainer(element, container, parentComponent, callback) { } } - var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property + var update = createUpdate(lane); // Caution: React DevTools currently depends on this property // being called "element". update.payload = { @@ -42247,6 +42240,7 @@ function updateContainer(element, container, parentComponent, callback) { var root = enqueueUpdate(current$1, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, current$1, lane, eventTime); entangleTransitions(root, current$1, lane); } diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index a4a2f42c24a08..b8aa3ab2b1744 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -17764,9 +17764,8 @@ function cloneUpdateQueue(current, workInProgress) { workInProgress.updateQueue = clone; } } -function createUpdate(eventTime, lane) { +function createUpdate(lane) { var update = { - eventTime: eventTime, lane: lane, tag: UpdateState, payload: null, @@ -17882,7 +17881,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { do { var clone = { - eventTime: update.eventTime, lane: update.lane, tag: update.tag, payload: update.payload, @@ -18095,11 +18093,9 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { var update = firstBaseUpdate; do { - // TODO: Don't need this field anymore - var updateEventTime = update.eventTime; // An extra OffscreenLane bit is added to updates that were made to + // An extra OffscreenLane bit is added to updates that were made to // a hidden tree, so that we can distinguish them from updates that were // already there when the tree was hidden. - var updateLane = removeLanes(update.lane, OffscreenLane); var isHiddenUpdate = updateLane !== update.lane; // Check if this update was made while the tree was hidden. If so, then // it's not a "base" update and we should disregard the extra base lanes @@ -18114,7 +18110,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // skipped update, the previous update/state is the new base // update/state. var clone = { - eventTime: updateEventTime, lane: updateLane, tag: update.tag, payload: update.payload, @@ -18134,7 +18129,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // This update does have sufficient priority. if (newLastBaseUpdate !== null) { var _clone = { - eventTime: updateEventTime, // This update is going to be committed so we never want uncommit // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. @@ -22617,11 +22611,11 @@ function refreshCache(fiber, seedKey, seedValue) { case HostRoot: { // Schedule an update on the cache boundary to trigger a refresh. var lane = requestUpdateLane(provider); - var eventTime = requestEventTime(); - var refreshUpdate = createUpdate(eventTime, lane); + var refreshUpdate = createUpdate(lane); var root = enqueueUpdate(provider, refreshUpdate, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, provider, lane, eventTime); entangleTransitions(root, provider, lane); } // TODO: If a refresh never commits, the new cache created here must be @@ -24228,9 +24222,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueSetState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.payload = payload; if (callback !== undefined && callback !== null) { @@ -24244,6 +24237,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -24263,9 +24257,8 @@ var classComponentUpdater = { }, enqueueReplaceState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ReplaceState; update.payload = payload; @@ -24280,6 +24273,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -24300,9 +24294,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueForceUpdate: function (inst, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; if (callback !== undefined && callback !== null) { @@ -24316,6 +24309,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -25359,7 +25353,7 @@ function logCapturedError(boundary, errorInfo) { } function createRootErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null. + var update = createUpdate(lane); // Unmount the root by rendering null. update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property // being called "element". @@ -25378,7 +25372,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { } function createClassErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = CaptureUpdate; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; @@ -25538,7 +25532,7 @@ function markSuspenseBoundaryShouldCapture( // When we try rendering again, we should not reuse the current fiber, // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. - var update = createUpdate(NoTimestamp, SyncLane); + var update = createUpdate(SyncLane); update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } @@ -30022,7 +30016,7 @@ function propagateContextChange_eager(workInProgress, context, renderLanes) { if (fiber.tag === ClassComponent) { // Schedule a force update on the work-in-progress. var lane = pickArbitraryLane(renderLanes); - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the // update to the current fiber, too, which means it will persist even if // this render is thrown away. Since it's a race condition, not sure it's @@ -41600,7 +41594,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-212b89fa2-20230221"; +var ReactVersion = "18.3.0-www-modern-c04b18070-20230222"; function createPortal$1( children, @@ -41710,11 +41704,11 @@ function createHydrationContainer( // enqueue the callback if one is provided). var current = root.current; - var eventTime = requestEventTime(); var lane = requestUpdateLane(current); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.callback = callback !== undefined && callback !== null ? callback : null; + var eventTime = requestEventTime(); enqueueUpdate(current, update, lane); scheduleInitialHydrationOnRoot(root, lane, eventTime); return root; @@ -41725,7 +41719,6 @@ function updateContainer(element, container, parentComponent, callback) { } var current$1 = container.current; - var eventTime = requestEventTime(); var lane = requestUpdateLane(current$1); if (enableSchedulingProfiler) { @@ -41754,7 +41747,7 @@ function updateContainer(element, container, parentComponent, callback) { } } - var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property + var update = createUpdate(lane); // Caution: React DevTools currently depends on this property // being called "element". update.payload = { @@ -41779,6 +41772,7 @@ function updateContainer(element, container, parentComponent, callback) { var root = enqueueUpdate(current$1, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, current$1, lane, eventTime); entangleTransitions(root, current$1, lane); } diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index a803749bd5db2..5a3d95d871be4 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -5571,15 +5571,8 @@ function cloneUpdateQueue(current, workInProgress) { callbacks: null }); } -function createUpdate(eventTime, lane) { - return { - eventTime: eventTime, - lane: lane, - tag: 0, - payload: null, - callback: null, - next: null - }; +function createUpdate(lane) { + return { lane: lane, tag: 0, payload: null, callback: null, next: null }; } function enqueueUpdate(fiber, update, lane) { var updateQueue = fiber.updateQueue; @@ -5625,7 +5618,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { if (null !== queue) { do { var clone = { - eventTime: queue.eventTime, lane: queue.lane, tag: queue.tag, payload: queue.payload, @@ -5660,7 +5652,7 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { function processUpdateQueue( workInProgress$jscomp$0, props, - instance, + instance$jscomp$0, renderLanes ) { var queue = workInProgress$jscomp$0.updateQueue; @@ -5693,8 +5685,7 @@ function processUpdateQueue( current = firstPendingUpdate = lastPendingUpdate = null; pendingQueue = firstBaseUpdate; do { - var updateEventTime = pendingQueue.eventTime, - updateLane = pendingQueue.lane & -1073741825, + var updateLane = pendingQueue.lane & -1073741825, isHiddenUpdate = updateLane !== pendingQueue.lane; if ( isHiddenUpdate @@ -5704,7 +5695,6 @@ function processUpdateQueue( null !== current && (current = current.next = { - eventTime: updateEventTime, lane: 0, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -5715,16 +5705,12 @@ function processUpdateQueue( var workInProgress = workInProgress$jscomp$0, update = pendingQueue; updateLane = props; - updateEventTime = instance; + var instance = instance$jscomp$0; switch (update.tag) { case 1: workInProgress = update.payload; if ("function" === typeof workInProgress) { - newState = workInProgress.call( - updateEventTime, - newState, - updateLane - ); + newState = workInProgress.call(instance, newState, updateLane); break a; } newState = workInProgress; @@ -5735,7 +5721,7 @@ function processUpdateQueue( workInProgress = update.payload; updateLane = "function" === typeof workInProgress - ? workInProgress.call(updateEventTime, newState, updateLane) + ? workInProgress.call(instance, newState, updateLane) : workInProgress; if (null === updateLane || void 0 === updateLane) break a; newState = assign({}, newState, updateLane); @@ -5754,7 +5740,6 @@ function processUpdateQueue( : isHiddenUpdate.push(updateLane)); } else (isHiddenUpdate = { - eventTime: updateEventTime, lane: updateLane, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -7263,13 +7248,14 @@ function refreshCache(fiber, seedKey, seedValue) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider), - eventTime = requestEventTime(); - fiber = createUpdate(eventTime, lane); + var lane = requestUpdateLane(provider); + fiber = createUpdate(lane); var root$83 = enqueueUpdate(provider, fiber, lane); - null !== root$83 && - (scheduleUpdateOnFiber(root$83, provider, lane, eventTime), - entangleTransitions(root$83, provider, lane)); + if (null !== root$83) { + var eventTime = requestEventTime(); + scheduleUpdateOnFiber(root$83, provider, lane, eventTime); + entangleTransitions(root$83, provider, lane); + } provider = createCache(); null !== seedKey && void 0 !== seedKey && @@ -7651,39 +7637,39 @@ var classComponentUpdater = { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 1; update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 2; void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - (scheduleUpdateOnFiber(callback, inst, lane, eventTime), + ((update = requestEventTime()), + scheduleUpdateOnFiber(callback, inst, lane, update), entangleTransitions(callback, inst, lane)); } }; @@ -7823,7 +7809,7 @@ function logCapturedError(boundary, errorInfo) { } } function createRootErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; lane.payload = { element: null }; var error = errorInfo.value; @@ -7834,7 +7820,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { return lane; } function createClassErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; if ("function" === typeof getDerivedStateFromError) { @@ -7879,7 +7865,7 @@ function markSuspenseBoundaryShouldCapture( 1 === sourceFiber.tag && (null === sourceFiber.alternate ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(-1, 2)), + : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), enqueueUpdate(sourceFiber, returnFiber, 2))), (sourceFiber.lanes |= 2)), @@ -9330,7 +9316,7 @@ function propagateContextChange(workInProgress, context, renderLanes) { for (var dependency = list.firstContext; null !== dependency; ) { if (dependency.context === context) { if (1 === fiber.tag) { - dependency = createUpdate(-1, renderLanes & -renderLanes); + dependency = createUpdate(renderLanes & -renderLanes); dependency.tag = 2; var updateQueue = fiber.updateQueue; if (null !== updateQueue) { @@ -15133,32 +15119,32 @@ function createHydrationContainer( ); initialChildren.context = getContextForSubtree(null); containerInfo = initialChildren.current; - tag = requestEventTime(); - hydrationCallbacks = requestUpdateLane(containerInfo); - isStrictMode = createUpdate(tag, hydrationCallbacks); - isStrictMode.callback = + tag = requestUpdateLane(containerInfo); + hydrationCallbacks = createUpdate(tag); + hydrationCallbacks.callback = void 0 !== callback && null !== callback ? callback : null; - enqueueUpdate(containerInfo, isStrictMode, hydrationCallbacks); - initialChildren.current.lanes = hydrationCallbacks; - markRootUpdated(initialChildren, hydrationCallbacks, tag); - ensureRootIsScheduled(initialChildren, tag); + callback = requestEventTime(); + enqueueUpdate(containerInfo, hydrationCallbacks, tag); + initialChildren.current.lanes = tag; + markRootUpdated(initialChildren, tag, callback); + ensureRootIsScheduled(initialChildren, callback); return initialChildren; } function updateContainer(element, container, parentComponent, callback) { var current = container.current, - eventTime = requestEventTime(), lane = requestUpdateLane(current); parentComponent = getContextForSubtree(parentComponent); null === container.context ? (container.context = parentComponent) : (container.pendingContext = parentComponent); - container = createUpdate(eventTime, lane); + container = createUpdate(lane); container.payload = { element: element }; callback = void 0 === callback ? null : callback; null !== callback && (container.callback = callback); element = enqueueUpdate(current, container, lane); null !== element && - (scheduleUpdateOnFiber(element, current, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(element, current, lane, callback), entangleTransitions(element, current, lane)); return lane; } @@ -15469,7 +15455,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1742 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-212b89fa2-20230221", + version: "18.3.0-www-classic-c04b18070-20230222", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2109 = { @@ -15499,7 +15485,7 @@ var internals$jscomp$inline_2109 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-212b89fa2-20230221" + reconcilerVersion: "18.3.0-next-c04b18070-20230222" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2110 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -15747,4 +15733,4 @@ exports.unstable_renderSubtreeIntoContainer = function ( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-212b89fa2-20230221"; +exports.version = "18.3.0-next-c04b18070-20230222"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 78681eb194ce3..1c6a582006e40 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -5377,15 +5377,8 @@ function cloneUpdateQueue(current, workInProgress) { callbacks: null }); } -function createUpdate(eventTime, lane) { - return { - eventTime: eventTime, - lane: lane, - tag: 0, - payload: null, - callback: null, - next: null - }; +function createUpdate(lane) { + return { lane: lane, tag: 0, payload: null, callback: null, next: null }; } function enqueueUpdate(fiber, update, lane) { var updateQueue = fiber.updateQueue; @@ -5431,7 +5424,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { if (null !== queue) { do { var clone = { - eventTime: queue.eventTime, lane: queue.lane, tag: queue.tag, payload: queue.payload, @@ -5466,7 +5458,7 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { function processUpdateQueue( workInProgress$jscomp$0, props, - instance, + instance$jscomp$0, renderLanes ) { var queue = workInProgress$jscomp$0.updateQueue; @@ -5499,8 +5491,7 @@ function processUpdateQueue( current = firstPendingUpdate = lastPendingUpdate = null; pendingQueue = firstBaseUpdate; do { - var updateEventTime = pendingQueue.eventTime, - updateLane = pendingQueue.lane & -1073741825, + var updateLane = pendingQueue.lane & -1073741825, isHiddenUpdate = updateLane !== pendingQueue.lane; if ( isHiddenUpdate @@ -5510,7 +5501,6 @@ function processUpdateQueue( null !== current && (current = current.next = { - eventTime: updateEventTime, lane: 0, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -5521,16 +5511,12 @@ function processUpdateQueue( var workInProgress = workInProgress$jscomp$0, update = pendingQueue; updateLane = props; - updateEventTime = instance; + var instance = instance$jscomp$0; switch (update.tag) { case 1: workInProgress = update.payload; if ("function" === typeof workInProgress) { - newState = workInProgress.call( - updateEventTime, - newState, - updateLane - ); + newState = workInProgress.call(instance, newState, updateLane); break a; } newState = workInProgress; @@ -5541,7 +5527,7 @@ function processUpdateQueue( workInProgress = update.payload; updateLane = "function" === typeof workInProgress - ? workInProgress.call(updateEventTime, newState, updateLane) + ? workInProgress.call(instance, newState, updateLane) : workInProgress; if (null === updateLane || void 0 === updateLane) break a; newState = assign({}, newState, updateLane); @@ -5560,7 +5546,6 @@ function processUpdateQueue( : isHiddenUpdate.push(updateLane)); } else (isHiddenUpdate = { - eventTime: updateEventTime, lane: updateLane, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -7069,13 +7054,14 @@ function refreshCache(fiber, seedKey, seedValue) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider), - eventTime = requestEventTime(); - fiber = createUpdate(eventTime, lane); + var lane = requestUpdateLane(provider); + fiber = createUpdate(lane); var root$84 = enqueueUpdate(provider, fiber, lane); - null !== root$84 && - (scheduleUpdateOnFiber(root$84, provider, lane, eventTime), - entangleTransitions(root$84, provider, lane)); + if (null !== root$84) { + var eventTime = requestEventTime(); + scheduleUpdateOnFiber(root$84, provider, lane, eventTime); + entangleTransitions(root$84, provider, lane); + } provider = createCache(); null !== seedKey && void 0 !== seedKey && @@ -7457,39 +7443,39 @@ var classComponentUpdater = { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 1; update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 2; void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - (scheduleUpdateOnFiber(callback, inst, lane, eventTime), + ((update = requestEventTime()), + scheduleUpdateOnFiber(callback, inst, lane, update), entangleTransitions(callback, inst, lane)); } }; @@ -7614,7 +7600,7 @@ function logCapturedError(boundary, errorInfo) { } } function createRootErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; lane.payload = { element: null }; var error = errorInfo.value; @@ -7625,7 +7611,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { return lane; } function createClassErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; if ("function" === typeof getDerivedStateFromError) { @@ -7670,7 +7656,7 @@ function markSuspenseBoundaryShouldCapture( 1 === sourceFiber.tag && (null === sourceFiber.alternate ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(-1, 2)), + : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), enqueueUpdate(sourceFiber, returnFiber, 2))), (sourceFiber.lanes |= 2)), @@ -9081,7 +9067,7 @@ function propagateContextChange(workInProgress, context, renderLanes) { for (var dependency = list.firstContext; null !== dependency; ) { if (dependency.context === context) { if (1 === fiber.tag) { - dependency = createUpdate(-1, renderLanes & -renderLanes); + dependency = createUpdate(renderLanes & -renderLanes); dependency.tag = 2; var updateQueue = fiber.updateQueue; if (null !== updateQueue) { @@ -14791,18 +14777,18 @@ function createPortal$1(children, containerInfo, implementation) { } function updateContainer(element, container, parentComponent, callback) { parentComponent = container.current; - var eventTime = requestEventTime(), - lane = requestUpdateLane(parentComponent); + var lane = requestUpdateLane(parentComponent); null === container.context ? (container.context = emptyContextObject) : (container.pendingContext = emptyContextObject); - container = createUpdate(eventTime, lane); + container = createUpdate(lane); container.payload = { element: element }; callback = void 0 === callback ? null : callback; null !== callback && (container.callback = callback); element = enqueueUpdate(parentComponent, container, lane); null !== element && - (scheduleUpdateOnFiber(element, parentComponent, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(element, parentComponent, lane, callback), entangleTransitions(element, parentComponent, lane)); return lane; } @@ -14998,7 +14984,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1701 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-212b89fa2-20230221", + version: "18.3.0-www-modern-c04b18070-20230222", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2073 = { @@ -15029,7 +15015,7 @@ var internals$jscomp$inline_2073 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-212b89fa2-20230221" + reconcilerVersion: "18.3.0-next-c04b18070-20230222" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2074 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -15124,21 +15110,14 @@ exports.hydrateRoot = function (container, initialChildren, options) { ); initialChildren.context = emptyContextObject; options = initialChildren.current; - isStrictMode = requestEventTime(); - concurrentUpdatesByDefaultOverride = requestUpdateLane(options); - identifierPrefix = createUpdate( - isStrictMode, - concurrentUpdatesByDefaultOverride - ); - identifierPrefix.callback = null; - enqueueUpdate(options, identifierPrefix, concurrentUpdatesByDefaultOverride); - initialChildren.current.lanes = concurrentUpdatesByDefaultOverride; - markRootUpdated( - initialChildren, - concurrentUpdatesByDefaultOverride, - isStrictMode - ); - ensureRootIsScheduled(initialChildren, isStrictMode); + isStrictMode = requestUpdateLane(options); + concurrentUpdatesByDefaultOverride = createUpdate(isStrictMode); + concurrentUpdatesByDefaultOverride.callback = null; + identifierPrefix = requestEventTime(); + enqueueUpdate(options, concurrentUpdatesByDefaultOverride, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode, identifierPrefix); + ensureRootIsScheduled(initialChildren, identifierPrefix); container[internalContainerInstanceKey] = initialChildren.current; Dispatcher.current = ReactDOMClientDispatcher; listenToAllSupportedEvents(container); @@ -15213,4 +15192,4 @@ exports.unstable_flushControlled = function (fn) { } }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-212b89fa2-20230221"; +exports.version = "18.3.0-next-c04b18070-20230222"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 3dca834d29ace..23e456b79eed7 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -5719,15 +5719,8 @@ function cloneUpdateQueue(current, workInProgress) { callbacks: null }); } -function createUpdate(eventTime, lane) { - return { - eventTime: eventTime, - lane: lane, - tag: 0, - payload: null, - callback: null, - next: null - }; +function createUpdate(lane) { + return { lane: lane, tag: 0, payload: null, callback: null, next: null }; } function enqueueUpdate(fiber, update, lane) { var updateQueue = fiber.updateQueue; @@ -5773,7 +5766,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { if (null !== queue) { do { var clone = { - eventTime: queue.eventTime, lane: queue.lane, tag: queue.tag, payload: queue.payload, @@ -5808,7 +5800,7 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { function processUpdateQueue( workInProgress$jscomp$0, props, - instance, + instance$jscomp$0, renderLanes ) { var queue = workInProgress$jscomp$0.updateQueue; @@ -5841,8 +5833,7 @@ function processUpdateQueue( current = firstPendingUpdate = lastPendingUpdate = null; pendingQueue = firstBaseUpdate; do { - var updateEventTime = pendingQueue.eventTime, - updateLane = pendingQueue.lane & -1073741825, + var updateLane = pendingQueue.lane & -1073741825, isHiddenUpdate = updateLane !== pendingQueue.lane; if ( isHiddenUpdate @@ -5852,7 +5843,6 @@ function processUpdateQueue( null !== current && (current = current.next = { - eventTime: updateEventTime, lane: 0, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -5863,16 +5853,12 @@ function processUpdateQueue( var workInProgress = workInProgress$jscomp$0, update = pendingQueue; updateLane = props; - updateEventTime = instance; + var instance = instance$jscomp$0; switch (update.tag) { case 1: workInProgress = update.payload; if ("function" === typeof workInProgress) { - newState = workInProgress.call( - updateEventTime, - newState, - updateLane - ); + newState = workInProgress.call(instance, newState, updateLane); break a; } newState = workInProgress; @@ -5883,7 +5869,7 @@ function processUpdateQueue( workInProgress = update.payload; updateLane = "function" === typeof workInProgress - ? workInProgress.call(updateEventTime, newState, updateLane) + ? workInProgress.call(instance, newState, updateLane) : workInProgress; if (null === updateLane || void 0 === updateLane) break a; newState = assign({}, newState, updateLane); @@ -5902,7 +5888,6 @@ function processUpdateQueue( : isHiddenUpdate.push(updateLane)); } else (isHiddenUpdate = { - eventTime: updateEventTime, lane: updateLane, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -7411,13 +7396,14 @@ function refreshCache(fiber, seedKey, seedValue) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider), - eventTime = requestEventTime(); - fiber = createUpdate(eventTime, lane); + var lane = requestUpdateLane(provider); + fiber = createUpdate(lane); var root$86 = enqueueUpdate(provider, fiber, lane); - null !== root$86 && - (scheduleUpdateOnFiber(root$86, provider, lane, eventTime), - entangleTransitions(root$86, provider, lane)); + if (null !== root$86) { + var eventTime = requestEventTime(); + scheduleUpdateOnFiber(root$86, provider, lane, eventTime); + entangleTransitions(root$86, provider, lane); + } provider = createCache(); null !== seedKey && void 0 !== seedKey && @@ -7863,41 +7849,41 @@ var classComponentUpdater = { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); enableSchedulingProfiler && markStateUpdateScheduled(inst, lane); }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 1; update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); enableSchedulingProfiler && markStateUpdateScheduled(inst, lane); }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 2; void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - (scheduleUpdateOnFiber(callback, inst, lane, eventTime), + ((update = requestEventTime()), + scheduleUpdateOnFiber(callback, inst, lane, update), entangleTransitions(callback, inst, lane)); enableSchedulingProfiler && enableSchedulingProfiler && @@ -8042,7 +8028,7 @@ function logCapturedError(boundary, errorInfo) { } } function createRootErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; lane.payload = { element: null }; var error = errorInfo.value; @@ -8053,7 +8039,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { return lane; } function createClassErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; if ("function" === typeof getDerivedStateFromError) { @@ -8098,7 +8084,7 @@ function markSuspenseBoundaryShouldCapture( 1 === sourceFiber.tag && (null === sourceFiber.alternate ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(-1, 2)), + : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), enqueueUpdate(sourceFiber, returnFiber, 2))), (sourceFiber.lanes |= 2)), @@ -9580,7 +9566,7 @@ function propagateContextChange(workInProgress, context, renderLanes) { for (var dependency = list.firstContext; null !== dependency; ) { if (dependency.context === context) { if (1 === fiber.tag) { - dependency = createUpdate(-1, renderLanes & -renderLanes); + dependency = createUpdate(renderLanes & -renderLanes); dependency.tag = 2; var updateQueue = fiber.updateQueue; if (null !== updateQueue) { @@ -15898,20 +15884,19 @@ function createHydrationContainer( ); initialChildren.context = getContextForSubtree(null); containerInfo = initialChildren.current; - tag = requestEventTime(); - hydrationCallbacks = requestUpdateLane(containerInfo); - isStrictMode = createUpdate(tag, hydrationCallbacks); - isStrictMode.callback = + tag = requestUpdateLane(containerInfo); + hydrationCallbacks = createUpdate(tag); + hydrationCallbacks.callback = void 0 !== callback && null !== callback ? callback : null; - enqueueUpdate(containerInfo, isStrictMode, hydrationCallbacks); - initialChildren.current.lanes = hydrationCallbacks; - markRootUpdated(initialChildren, hydrationCallbacks, tag); - ensureRootIsScheduled(initialChildren, tag); + callback = requestEventTime(); + enqueueUpdate(containerInfo, hydrationCallbacks, tag); + initialChildren.current.lanes = tag; + markRootUpdated(initialChildren, tag, callback); + ensureRootIsScheduled(initialChildren, callback); return initialChildren; } function updateContainer(element, container, parentComponent, callback) { var current = container.current, - eventTime = requestEventTime(), lane = requestUpdateLane(current); enableSchedulingProfiler && enableSchedulingProfiler && @@ -15922,13 +15907,14 @@ function updateContainer(element, container, parentComponent, callback) { null === container.context ? (container.context = parentComponent) : (container.pendingContext = parentComponent); - container = createUpdate(eventTime, lane); + container = createUpdate(lane); container.payload = { element: element }; callback = void 0 === callback ? null : callback; null !== callback && (container.callback = callback); element = enqueueUpdate(current, container, lane); null !== element && - (scheduleUpdateOnFiber(element, current, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(element, current, lane, callback), entangleTransitions(element, current, lane)); return lane; } @@ -16239,7 +16225,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1822 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-212b89fa2-20230221", + version: "18.3.0-www-classic-c04b18070-20230222", rendererPackageName: "react-dom" }; (function (internals) { @@ -16283,7 +16269,7 @@ var devToolsConfig$jscomp$inline_1822 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-212b89fa2-20230221" + reconcilerVersion: "18.3.0-next-c04b18070-20230222" }); assign(Internals, { ReactBrowserEventEmitter: { @@ -16518,7 +16504,7 @@ exports.unstable_renderSubtreeIntoContainer = function ( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-212b89fa2-20230221"; +exports.version = "18.3.0-next-c04b18070-20230222"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index 75d5c995b8613..067606d1afb13 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -5521,15 +5521,8 @@ function cloneUpdateQueue(current, workInProgress) { callbacks: null }); } -function createUpdate(eventTime, lane) { - return { - eventTime: eventTime, - lane: lane, - tag: 0, - payload: null, - callback: null, - next: null - }; +function createUpdate(lane) { + return { lane: lane, tag: 0, payload: null, callback: null, next: null }; } function enqueueUpdate(fiber, update, lane) { var updateQueue = fiber.updateQueue; @@ -5575,7 +5568,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { if (null !== queue) { do { var clone = { - eventTime: queue.eventTime, lane: queue.lane, tag: queue.tag, payload: queue.payload, @@ -5610,7 +5602,7 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { function processUpdateQueue( workInProgress$jscomp$0, props, - instance, + instance$jscomp$0, renderLanes ) { var queue = workInProgress$jscomp$0.updateQueue; @@ -5643,8 +5635,7 @@ function processUpdateQueue( current = firstPendingUpdate = lastPendingUpdate = null; pendingQueue = firstBaseUpdate; do { - var updateEventTime = pendingQueue.eventTime, - updateLane = pendingQueue.lane & -1073741825, + var updateLane = pendingQueue.lane & -1073741825, isHiddenUpdate = updateLane !== pendingQueue.lane; if ( isHiddenUpdate @@ -5654,7 +5645,6 @@ function processUpdateQueue( null !== current && (current = current.next = { - eventTime: updateEventTime, lane: 0, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -5665,16 +5655,12 @@ function processUpdateQueue( var workInProgress = workInProgress$jscomp$0, update = pendingQueue; updateLane = props; - updateEventTime = instance; + var instance = instance$jscomp$0; switch (update.tag) { case 1: workInProgress = update.payload; if ("function" === typeof workInProgress) { - newState = workInProgress.call( - updateEventTime, - newState, - updateLane - ); + newState = workInProgress.call(instance, newState, updateLane); break a; } newState = workInProgress; @@ -5685,7 +5671,7 @@ function processUpdateQueue( workInProgress = update.payload; updateLane = "function" === typeof workInProgress - ? workInProgress.call(updateEventTime, newState, updateLane) + ? workInProgress.call(instance, newState, updateLane) : workInProgress; if (null === updateLane || void 0 === updateLane) break a; newState = assign({}, newState, updateLane); @@ -5704,7 +5690,6 @@ function processUpdateQueue( : isHiddenUpdate.push(updateLane)); } else (isHiddenUpdate = { - eventTime: updateEventTime, lane: updateLane, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -7213,13 +7198,14 @@ function refreshCache(fiber, seedKey, seedValue) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider), - eventTime = requestEventTime(); - fiber = createUpdate(eventTime, lane); + var lane = requestUpdateLane(provider); + fiber = createUpdate(lane); var root$87 = enqueueUpdate(provider, fiber, lane); - null !== root$87 && - (scheduleUpdateOnFiber(root$87, provider, lane, eventTime), - entangleTransitions(root$87, provider, lane)); + if (null !== root$87) { + var eventTime = requestEventTime(); + scheduleUpdateOnFiber(root$87, provider, lane, eventTime); + entangleTransitions(root$87, provider, lane); + } provider = createCache(); null !== seedKey && void 0 !== seedKey && @@ -7665,41 +7651,41 @@ var classComponentUpdater = { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); enableSchedulingProfiler && markStateUpdateScheduled(inst, lane); }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 1; update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); enableSchedulingProfiler && markStateUpdateScheduled(inst, lane); }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 2; void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - (scheduleUpdateOnFiber(callback, inst, lane, eventTime), + ((update = requestEventTime()), + scheduleUpdateOnFiber(callback, inst, lane, update), entangleTransitions(callback, inst, lane)); enableSchedulingProfiler && enableSchedulingProfiler && @@ -7829,7 +7815,7 @@ function logCapturedError(boundary, errorInfo) { } } function createRootErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; lane.payload = { element: null }; var error = errorInfo.value; @@ -7840,7 +7826,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { return lane; } function createClassErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; if ("function" === typeof getDerivedStateFromError) { @@ -7885,7 +7871,7 @@ function markSuspenseBoundaryShouldCapture( 1 === sourceFiber.tag && (null === sourceFiber.alternate ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(-1, 2)), + : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), enqueueUpdate(sourceFiber, returnFiber, 2))), (sourceFiber.lanes |= 2)), @@ -9321,7 +9307,7 @@ function propagateContextChange(workInProgress, context, renderLanes) { for (var dependency = list.firstContext; null !== dependency; ) { if (dependency.context === context) { if (1 === fiber.tag) { - dependency = createUpdate(-1, renderLanes & -renderLanes); + dependency = createUpdate(renderLanes & -renderLanes); dependency.tag = 2; var updateQueue = fiber.updateQueue; if (null !== updateQueue) { @@ -15546,8 +15532,7 @@ function createPortal$1(children, containerInfo, implementation) { } function updateContainer(element, container, parentComponent, callback) { parentComponent = container.current; - var eventTime = requestEventTime(), - lane = requestUpdateLane(parentComponent); + var lane = requestUpdateLane(parentComponent); enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && @@ -15556,13 +15541,14 @@ function updateContainer(element, container, parentComponent, callback) { null === container.context ? (container.context = emptyContextObject) : (container.pendingContext = emptyContextObject); - container = createUpdate(eventTime, lane); + container = createUpdate(lane); container.payload = { element: element }; callback = void 0 === callback ? null : callback; null !== callback && (container.callback = callback); element = enqueueUpdate(parentComponent, container, lane); null !== element && - (scheduleUpdateOnFiber(element, parentComponent, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(element, parentComponent, lane, callback), entangleTransitions(element, parentComponent, lane)); return lane; } @@ -15758,7 +15744,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1781 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-212b89fa2-20230221", + version: "18.3.0-www-modern-c04b18070-20230222", rendererPackageName: "react-dom" }; (function (internals) { @@ -15803,7 +15789,7 @@ var devToolsConfig$jscomp$inline_1781 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-212b89fa2-20230221" + reconcilerVersion: "18.3.0-next-c04b18070-20230222" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; exports.createPortal = function (children, container) { @@ -15885,21 +15871,14 @@ exports.hydrateRoot = function (container, initialChildren, options) { ); initialChildren.context = emptyContextObject; options = initialChildren.current; - isStrictMode = requestEventTime(); - concurrentUpdatesByDefaultOverride = requestUpdateLane(options); - identifierPrefix = createUpdate( - isStrictMode, - concurrentUpdatesByDefaultOverride - ); - identifierPrefix.callback = null; - enqueueUpdate(options, identifierPrefix, concurrentUpdatesByDefaultOverride); - initialChildren.current.lanes = concurrentUpdatesByDefaultOverride; - markRootUpdated( - initialChildren, - concurrentUpdatesByDefaultOverride, - isStrictMode - ); - ensureRootIsScheduled(initialChildren, isStrictMode); + isStrictMode = requestUpdateLane(options); + concurrentUpdatesByDefaultOverride = createUpdate(isStrictMode); + concurrentUpdatesByDefaultOverride.callback = null; + identifierPrefix = requestEventTime(); + enqueueUpdate(options, concurrentUpdatesByDefaultOverride, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode, identifierPrefix); + ensureRootIsScheduled(initialChildren, identifierPrefix); container[internalContainerInstanceKey] = initialChildren.current; Dispatcher.current = ReactDOMClientDispatcher; listenToAllSupportedEvents(container); @@ -15974,7 +15953,7 @@ exports.unstable_flushControlled = function (fn) { } }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-212b89fa2-20230221"; +exports.version = "18.3.0-next-c04b18070-20230222"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index a8744642b71da..d6fa780e5cefe 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); -var ReactVersion = "18.3.0-www-classic-212b89fa2-20230221"; +var ReactVersion = "18.3.0-www-classic-c04b18070-20230222"; // This refers to a WWW module. var warningWWW = require("warning"); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 9d2d895b999d1..5ef7c195b2418 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); -var ReactVersion = "18.3.0-www-modern-212b89fa2-20230221"; +var ReactVersion = "18.3.0-www-modern-c04b18070-20230222"; // This refers to a WWW module. var warningWWW = require("warning"); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index c63a644864e22..cf96cde2f2687 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -3670,4 +3670,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "18.3.0-www-classic-212b89fa2-20230221"; +exports.version = "18.3.0-www-classic-c04b18070-20230222"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index b779ad2f1a1f4..9dcc821e8906a 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -3568,4 +3568,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "18.3.0-www-modern-212b89fa2-20230221"; +exports.version = "18.3.0-www-modern-c04b18070-20230222"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 18e7021d5a113..74ab019cca4d3 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -10089,9 +10089,8 @@ function cloneUpdateQueue(current, workInProgress) { workInProgress.updateQueue = clone; } } -function createUpdate(eventTime, lane) { +function createUpdate(lane) { var update = { - eventTime: eventTime, lane: lane, tag: UpdateState, payload: null, @@ -10207,7 +10206,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { do { var clone = { - eventTime: update.eventTime, lane: update.lane, tag: update.tag, payload: update.payload, @@ -10400,11 +10398,9 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { var update = firstBaseUpdate; do { - // TODO: Don't need this field anymore - var updateEventTime = update.eventTime; // An extra OffscreenLane bit is added to updates that were made to + // An extra OffscreenLane bit is added to updates that were made to // a hidden tree, so that we can distinguish them from updates that were // already there when the tree was hidden. - var updateLane = removeLanes(update.lane, OffscreenLane); var isHiddenUpdate = updateLane !== update.lane; // Check if this update was made while the tree was hidden. If so, then // it's not a "base" update and we should disregard the extra base lanes @@ -10419,7 +10415,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // skipped update, the previous update/state is the new base // update/state. var clone = { - eventTime: updateEventTime, lane: updateLane, tag: update.tag, payload: update.payload, @@ -10439,7 +10434,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // This update does have sufficient priority. if (newLastBaseUpdate !== null) { var _clone = { - eventTime: updateEventTime, // This update is going to be committed so we never want uncommit // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. @@ -14717,11 +14711,11 @@ function refreshCache(fiber, seedKey, seedValue) { case HostRoot: { // Schedule an update on the cache boundary to trigger a refresh. var lane = requestUpdateLane(provider); - var eventTime = requestEventTime(); - var refreshUpdate = createUpdate(eventTime, lane); + var refreshUpdate = createUpdate(lane); var root = enqueueUpdate(provider, refreshUpdate, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, provider, lane, eventTime); entangleTransitions(root, provider, lane); } // TODO: If a refresh never commits, the new cache created here must be @@ -16032,9 +16026,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueSetState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.payload = payload; if (callback !== undefined && callback !== null) { @@ -16048,15 +16041,15 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } }, enqueueReplaceState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ReplaceState; update.payload = payload; @@ -16071,6 +16064,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -16078,9 +16072,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueForceUpdate: function (inst, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; if (callback !== undefined && callback !== null) { @@ -16094,6 +16087,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -17121,7 +17115,7 @@ function logCapturedError(boundary, errorInfo) { } function createRootErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null. + var update = createUpdate(lane); // Unmount the root by rendering null. update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property // being called "element". @@ -17140,7 +17134,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { } function createClassErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = CaptureUpdate; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; @@ -17283,7 +17277,7 @@ function markSuspenseBoundaryShouldCapture( // When we try rendering again, we should not reuse the current fiber, // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. - var update = createUpdate(NoTimestamp, SyncLane); + var update = createUpdate(SyncLane); update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } @@ -21219,7 +21213,7 @@ function propagateContextChange_eager(workInProgress, context, renderLanes) { if (fiber.tag === ClassComponent) { // Schedule a force update on the work-in-progress. var lane = pickArbitraryLane(renderLanes); - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the // update to the current fiber, too, which means it will persist even if // this render is thrown away. Since it's a race condition, not sure it's @@ -31233,7 +31227,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-212b89fa2-20230221"; +var ReactVersion = "18.3.0-www-classic-c04b18070-20230222"; function createPortal$1( children, @@ -31413,11 +31407,11 @@ function createHydrationContainer( // enqueue the callback if one is provided). var current = root.current; - var eventTime = requestEventTime(); var lane = requestUpdateLane(current); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.callback = callback !== undefined && callback !== null ? callback : null; + var eventTime = requestEventTime(); enqueueUpdate(current, update, lane); scheduleInitialHydrationOnRoot(root, lane, eventTime); return root; @@ -31428,7 +31422,6 @@ function updateContainer(element, container, parentComponent, callback) { } var current$1 = container.current; - var eventTime = requestEventTime(); var lane = requestUpdateLane(current$1); var context = getContextForSubtree(parentComponent); @@ -31453,7 +31446,7 @@ function updateContainer(element, container, parentComponent, callback) { } } - var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property + var update = createUpdate(lane); // Caution: React DevTools currently depends on this property // being called "element". update.payload = { @@ -31478,6 +31471,7 @@ function updateContainer(element, container, parentComponent, callback) { var root = enqueueUpdate(current$1, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, current$1, lane, eventTime); entangleTransitions(root, current$1, lane); } diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 5f79ee2a123e0..c6be13ce78525 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -16733,9 +16733,8 @@ function cloneUpdateQueue(current, workInProgress) { workInProgress.updateQueue = clone; } } -function createUpdate(eventTime, lane) { +function createUpdate(lane) { var update = { - eventTime: eventTime, lane: lane, tag: UpdateState, payload: null, @@ -16851,7 +16850,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { do { var clone = { - eventTime: update.eventTime, lane: update.lane, tag: update.tag, payload: update.payload, @@ -17044,11 +17042,9 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { var update = firstBaseUpdate; do { - // TODO: Don't need this field anymore - var updateEventTime = update.eventTime; // An extra OffscreenLane bit is added to updates that were made to + // An extra OffscreenLane bit is added to updates that were made to // a hidden tree, so that we can distinguish them from updates that were // already there when the tree was hidden. - var updateLane = removeLanes(update.lane, OffscreenLane); var isHiddenUpdate = updateLane !== update.lane; // Check if this update was made while the tree was hidden. If so, then // it's not a "base" update and we should disregard the extra base lanes @@ -17063,7 +17059,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // skipped update, the previous update/state is the new base // update/state. var clone = { - eventTime: updateEventTime, lane: updateLane, tag: update.tag, payload: update.payload, @@ -17083,7 +17078,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // This update does have sufficient priority. if (newLastBaseUpdate !== null) { var _clone = { - eventTime: updateEventTime, // This update is going to be committed so we never want uncommit // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. @@ -21320,11 +21314,11 @@ function refreshCache(fiber, seedKey, seedValue) { case HostRoot: { // Schedule an update on the cache boundary to trigger a refresh. var lane = requestUpdateLane(provider); - var eventTime = requestEventTime(); - var refreshUpdate = createUpdate(eventTime, lane); + var refreshUpdate = createUpdate(lane); var root = enqueueUpdate(provider, refreshUpdate, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, provider, lane, eventTime); entangleTransitions(root, provider, lane); } // TODO: If a refresh never commits, the new cache created here must be @@ -22633,9 +22627,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueSetState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.payload = payload; if (callback !== undefined && callback !== null) { @@ -22649,15 +22642,15 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } }, enqueueReplaceState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ReplaceState; update.payload = payload; @@ -22672,6 +22665,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -22679,9 +22673,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueForceUpdate: function (inst, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; if (callback !== undefined && callback !== null) { @@ -22695,6 +22688,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -23690,7 +23684,7 @@ function logCapturedError(boundary, errorInfo) { } function createRootErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null. + var update = createUpdate(lane); // Unmount the root by rendering null. update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property // being called "element". @@ -23709,7 +23703,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { } function createClassErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = CaptureUpdate; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; @@ -23852,7 +23846,7 @@ function markSuspenseBoundaryShouldCapture( // When we try rendering again, we should not reuse the current fiber, // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. - var update = createUpdate(NoTimestamp, SyncLane); + var update = createUpdate(SyncLane); update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } @@ -27755,7 +27749,7 @@ function propagateContextChange_eager(workInProgress, context, renderLanes) { if (fiber.tag === ClassComponent) { // Schedule a force update on the work-in-progress. var lane = pickArbitraryLane(renderLanes); - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the // update to the current fiber, too, which means it will persist even if // this render is thrown away. Since it's a race condition, not sure it's @@ -37624,7 +37618,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-212b89fa2-20230221"; +var ReactVersion = "18.3.0-www-modern-c04b18070-20230222"; function createPortal$1( children, @@ -37732,11 +37726,11 @@ function createHydrationContainer( // enqueue the callback if one is provided). var current = root.current; - var eventTime = requestEventTime(); var lane = requestUpdateLane(current); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.callback = callback !== undefined && callback !== null ? callback : null; + var eventTime = requestEventTime(); enqueueUpdate(current, update, lane); scheduleInitialHydrationOnRoot(root, lane, eventTime); return root; @@ -37747,7 +37741,6 @@ function updateContainer(element, container, parentComponent, callback) { } var current$1 = container.current; - var eventTime = requestEventTime(); var lane = requestUpdateLane(current$1); var context = getContextForSubtree(parentComponent); @@ -37772,7 +37765,7 @@ function updateContainer(element, container, parentComponent, callback) { } } - var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property + var update = createUpdate(lane); // Caution: React DevTools currently depends on this property // being called "element". update.payload = { @@ -37797,6 +37790,7 @@ function updateContainer(element, container, parentComponent, callback) { var root = enqueueUpdate(current$1, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, current$1, lane, eventTime); entangleTransitions(root, current$1, lane); } diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 0aa6f0fd46243..bf0f6b6f801a4 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -2530,15 +2530,8 @@ function cloneUpdateQueue(current, workInProgress) { callbacks: null }); } -function createUpdate(eventTime, lane) { - return { - eventTime: eventTime, - lane: lane, - tag: 0, - payload: null, - callback: null, - next: null - }; +function createUpdate(lane) { + return { lane: lane, tag: 0, payload: null, callback: null, next: null }; } function enqueueUpdate(fiber, update, lane) { var updateQueue = fiber.updateQueue; @@ -2580,7 +2573,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { if (null !== queue) { do { var clone = { - eventTime: queue.eventTime, lane: queue.lane, tag: queue.tag, payload: queue.payload, @@ -2615,7 +2607,7 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { function processUpdateQueue( workInProgress$jscomp$0, props, - instance, + instance$jscomp$0, renderLanes ) { var queue = workInProgress$jscomp$0.updateQueue; @@ -2648,8 +2640,7 @@ function processUpdateQueue( current = firstPendingUpdate = lastPendingUpdate = null; pendingQueue = firstBaseUpdate; do { - var updateEventTime = pendingQueue.eventTime, - updateLane = pendingQueue.lane & -1073741825, + var updateLane = pendingQueue.lane & -1073741825, isHiddenUpdate = updateLane !== pendingQueue.lane; if ( isHiddenUpdate @@ -2659,7 +2650,6 @@ function processUpdateQueue( null !== current && (current = current.next = { - eventTime: updateEventTime, lane: 0, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -2670,16 +2660,12 @@ function processUpdateQueue( var workInProgress = workInProgress$jscomp$0, update = pendingQueue; updateLane = props; - updateEventTime = instance; + var instance = instance$jscomp$0; switch (update.tag) { case 1: workInProgress = update.payload; if ("function" === typeof workInProgress) { - newState = workInProgress.call( - updateEventTime, - newState, - updateLane - ); + newState = workInProgress.call(instance, newState, updateLane); break a; } newState = workInProgress; @@ -2690,7 +2676,7 @@ function processUpdateQueue( workInProgress = update.payload; updateLane = "function" === typeof workInProgress - ? workInProgress.call(updateEventTime, newState, updateLane) + ? workInProgress.call(instance, newState, updateLane) : workInProgress; if (null === updateLane || void 0 === updateLane) break a; newState = assign({}, newState, updateLane); @@ -2709,7 +2695,6 @@ function processUpdateQueue( : isHiddenUpdate.push(updateLane)); } else (isHiddenUpdate = { - eventTime: updateEventTime, lane: updateLane, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -4172,13 +4157,14 @@ function refreshCache(fiber, seedKey, seedValue) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider), - eventTime = requestEventTime(); - fiber = createUpdate(eventTime, lane); + var lane = requestUpdateLane(provider); + fiber = createUpdate(lane); var root$46 = enqueueUpdate(provider, fiber, lane); - null !== root$46 && - (scheduleUpdateOnFiber(root$46, provider, lane, eventTime), - entangleTransitions(root$46, provider, lane)); + if (null !== root$46) { + var eventTime = requestEventTime(); + scheduleUpdateOnFiber(root$46, provider, lane, eventTime); + entangleTransitions(root$46, provider, lane); + } provider = createCache(); null !== seedKey && void 0 !== seedKey && @@ -4539,39 +4525,39 @@ var classComponentUpdater = { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 1; update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 2; void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - (scheduleUpdateOnFiber(callback, inst, lane, eventTime), + ((update = requestEventTime()), + scheduleUpdateOnFiber(callback, inst, lane, update), entangleTransitions(callback, inst, lane)); } }; @@ -4711,7 +4697,7 @@ function logCapturedError(boundary, errorInfo) { } } function createRootErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; lane.payload = { element: null }; var error = errorInfo.value; @@ -4722,7 +4708,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { return lane; } function createClassErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; if ("function" === typeof getDerivedStateFromError) { @@ -4767,7 +4753,7 @@ function markSuspenseBoundaryShouldCapture( 1 === sourceFiber.tag && (null === sourceFiber.alternate ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(-1, 2)), + : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), enqueueUpdate(sourceFiber, returnFiber, 2))), (sourceFiber.lanes |= 2)), @@ -5962,7 +5948,7 @@ function propagateContextChange(workInProgress, context, renderLanes) { for (var dependency = list.firstContext; null !== dependency; ) { if (dependency.context === context) { if (1 === fiber.tag) { - dependency = createUpdate(-1, renderLanes & -renderLanes); + dependency = createUpdate(renderLanes & -renderLanes); dependency.tag = 2; var updateQueue = fiber.updateQueue; if (null !== updateQueue) { @@ -11172,32 +11158,32 @@ function createHydrationContainer( ); initialChildren.context = getContextForSubtree(null); containerInfo = initialChildren.current; - tag = requestEventTime(); - hydrationCallbacks = requestUpdateLane(containerInfo); - isStrictMode = createUpdate(tag, hydrationCallbacks); - isStrictMode.callback = + tag = requestUpdateLane(containerInfo); + hydrationCallbacks = createUpdate(tag); + hydrationCallbacks.callback = void 0 !== callback && null !== callback ? callback : null; - enqueueUpdate(containerInfo, isStrictMode, hydrationCallbacks); - initialChildren.current.lanes = hydrationCallbacks; - markRootUpdated(initialChildren, hydrationCallbacks, tag); - ensureRootIsScheduled(initialChildren, tag); + callback = requestEventTime(); + enqueueUpdate(containerInfo, hydrationCallbacks, tag); + initialChildren.current.lanes = tag; + markRootUpdated(initialChildren, tag, callback); + ensureRootIsScheduled(initialChildren, callback); return initialChildren; } function updateContainer(element, container, parentComponent, callback) { var current = container.current, - eventTime = requestEventTime(), lane = requestUpdateLane(current); parentComponent = getContextForSubtree(parentComponent); null === container.context ? (container.context = parentComponent) : (container.pendingContext = parentComponent); - container = createUpdate(eventTime, lane); + container = createUpdate(lane); container.payload = { element: element }; callback = void 0 === callback ? null : callback; null !== callback && (container.callback = callback); element = enqueueUpdate(current, container, lane); null !== element && - (scheduleUpdateOnFiber(element, current, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(element, current, lane, callback), entangleTransitions(element, current, lane)); return lane; } @@ -11541,7 +11527,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1536 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-212b89fa2-20230221", + version: "18.3.0-www-classic-c04b18070-20230222", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2059 = { @@ -11571,7 +11557,7 @@ var internals$jscomp$inline_2059 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-212b89fa2-20230221" + reconcilerVersion: "18.3.0-next-c04b18070-20230222" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2060 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -14749,4 +14735,4 @@ exports.unstable_renderSubtreeIntoContainer = function ( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-212b89fa2-20230221"; +exports.version = "18.3.0-next-c04b18070-20230222"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 031c341bf6ef8..1c52f853e6994 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -5219,15 +5219,8 @@ function cloneUpdateQueue(current, workInProgress) { callbacks: null }); } -function createUpdate(eventTime, lane) { - return { - eventTime: eventTime, - lane: lane, - tag: 0, - payload: null, - callback: null, - next: null - }; +function createUpdate(lane) { + return { lane: lane, tag: 0, payload: null, callback: null, next: null }; } function enqueueUpdate(fiber, update, lane) { var updateQueue = fiber.updateQueue; @@ -5269,7 +5262,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { if (null !== queue) { do { var clone = { - eventTime: queue.eventTime, lane: queue.lane, tag: queue.tag, payload: queue.payload, @@ -5304,7 +5296,7 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { function processUpdateQueue( workInProgress$jscomp$0, props, - instance, + instance$jscomp$0, renderLanes ) { var queue = workInProgress$jscomp$0.updateQueue; @@ -5337,8 +5329,7 @@ function processUpdateQueue( current = firstPendingUpdate = lastPendingUpdate = null; pendingQueue = firstBaseUpdate; do { - var updateEventTime = pendingQueue.eventTime, - updateLane = pendingQueue.lane & -1073741825, + var updateLane = pendingQueue.lane & -1073741825, isHiddenUpdate = updateLane !== pendingQueue.lane; if ( isHiddenUpdate @@ -5348,7 +5339,6 @@ function processUpdateQueue( null !== current && (current = current.next = { - eventTime: updateEventTime, lane: 0, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -5359,16 +5349,12 @@ function processUpdateQueue( var workInProgress = workInProgress$jscomp$0, update = pendingQueue; updateLane = props; - updateEventTime = instance; + var instance = instance$jscomp$0; switch (update.tag) { case 1: workInProgress = update.payload; if ("function" === typeof workInProgress) { - newState = workInProgress.call( - updateEventTime, - newState, - updateLane - ); + newState = workInProgress.call(instance, newState, updateLane); break a; } newState = workInProgress; @@ -5379,7 +5365,7 @@ function processUpdateQueue( workInProgress = update.payload; updateLane = "function" === typeof workInProgress - ? workInProgress.call(updateEventTime, newState, updateLane) + ? workInProgress.call(instance, newState, updateLane) : workInProgress; if (null === updateLane || void 0 === updateLane) break a; newState = assign({}, newState, updateLane); @@ -5398,7 +5384,6 @@ function processUpdateQueue( : isHiddenUpdate.push(updateLane)); } else (isHiddenUpdate = { - eventTime: updateEventTime, lane: updateLane, tag: pendingQueue.tag, payload: pendingQueue.payload, @@ -6839,13 +6824,14 @@ function refreshCache(fiber, seedKey, seedValue) { switch (provider.tag) { case 24: case 3: - var lane = requestUpdateLane(provider), - eventTime = requestEventTime(); - fiber = createUpdate(eventTime, lane); + var lane = requestUpdateLane(provider); + fiber = createUpdate(lane); var root$79 = enqueueUpdate(provider, fiber, lane); - null !== root$79 && - (scheduleUpdateOnFiber(root$79, provider, lane, eventTime), - entangleTransitions(root$79, provider, lane)); + if (null !== root$79) { + var eventTime = requestEventTime(); + scheduleUpdateOnFiber(root$79, provider, lane, eventTime); + entangleTransitions(root$79, provider, lane); + } provider = createCache(); null !== seedKey && void 0 !== seedKey && @@ -7206,39 +7192,39 @@ var classComponentUpdater = { }, enqueueSetState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); }, enqueueReplaceState: function (inst, payload, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 1; update.payload = payload; void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - (scheduleUpdateOnFiber(payload, inst, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(payload, inst, lane, callback), entangleTransitions(payload, inst, lane)); }, enqueueForceUpdate: function (inst, callback) { inst = inst._reactInternals; - var eventTime = requestEventTime(), - lane = requestUpdateLane(inst), - update = createUpdate(eventTime, lane); + var lane = requestUpdateLane(inst), + update = createUpdate(lane); update.tag = 2; void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - (scheduleUpdateOnFiber(callback, inst, lane, eventTime), + ((update = requestEventTime()), + scheduleUpdateOnFiber(callback, inst, lane, update), entangleTransitions(callback, inst, lane)); } }; @@ -7363,7 +7349,7 @@ function logCapturedError(boundary, errorInfo) { } } function createRootErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; lane.payload = { element: null }; var error = errorInfo.value; @@ -7374,7 +7360,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { return lane; } function createClassErrorUpdate(fiber, errorInfo, lane) { - lane = createUpdate(-1, lane); + lane = createUpdate(lane); lane.tag = 3; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; if ("function" === typeof getDerivedStateFromError) { @@ -7419,7 +7405,7 @@ function markSuspenseBoundaryShouldCapture( 1 === sourceFiber.tag && (null === sourceFiber.alternate ? (sourceFiber.tag = 17) - : ((returnFiber = createUpdate(-1, 2)), + : ((returnFiber = createUpdate(2)), (returnFiber.tag = 2), enqueueUpdate(sourceFiber, returnFiber, 2))), (sourceFiber.lanes |= 2)), @@ -8579,7 +8565,7 @@ function propagateContextChange(workInProgress, context, renderLanes) { for (var dependency = list.firstContext; null !== dependency; ) { if (dependency.context === context) { if (1 === fiber.tag) { - dependency = createUpdate(-1, renderLanes & -renderLanes); + dependency = createUpdate(renderLanes & -renderLanes); dependency.tag = 2; var updateQueue = fiber.updateQueue; if (null !== updateQueue) { @@ -13663,18 +13649,18 @@ function createPortal$1(children, containerInfo, implementation) { } function updateContainer(element, container, parentComponent, callback) { parentComponent = container.current; - var eventTime = requestEventTime(), - lane = requestUpdateLane(parentComponent); + var lane = requestUpdateLane(parentComponent); null === container.context ? (container.context = emptyContextObject) : (container.pendingContext = emptyContextObject); - container = createUpdate(eventTime, lane); + container = createUpdate(lane); container.payload = { element: element }; callback = void 0 === callback ? null : callback; null !== callback && (container.callback = callback); element = enqueueUpdate(parentComponent, container, lane); null !== element && - (scheduleUpdateOnFiber(element, parentComponent, lane, eventTime), + ((callback = requestEventTime()), + scheduleUpdateOnFiber(element, parentComponent, lane, callback), entangleTransitions(element, parentComponent, lane)); return lane; } @@ -13856,7 +13842,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1653 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-212b89fa2-20230221", + version: "18.3.0-www-modern-c04b18070-20230222", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2033 = { @@ -13887,7 +13873,7 @@ var internals$jscomp$inline_2033 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-212b89fa2-20230221" + reconcilerVersion: "18.3.0-next-c04b18070-20230222" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2034 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -14107,21 +14093,14 @@ exports.hydrateRoot = function (container, initialChildren, options) { ); initialChildren.context = emptyContextObject; options = initialChildren.current; - isStrictMode = requestEventTime(); - concurrentUpdatesByDefaultOverride = requestUpdateLane(options); - identifierPrefix = createUpdate( - isStrictMode, - concurrentUpdatesByDefaultOverride - ); - identifierPrefix.callback = null; - enqueueUpdate(options, identifierPrefix, concurrentUpdatesByDefaultOverride); - initialChildren.current.lanes = concurrentUpdatesByDefaultOverride; - markRootUpdated( - initialChildren, - concurrentUpdatesByDefaultOverride, - isStrictMode - ); - ensureRootIsScheduled(initialChildren, isStrictMode); + isStrictMode = requestUpdateLane(options); + concurrentUpdatesByDefaultOverride = createUpdate(isStrictMode); + concurrentUpdatesByDefaultOverride.callback = null; + identifierPrefix = requestEventTime(); + enqueueUpdate(options, concurrentUpdatesByDefaultOverride, isStrictMode); + initialChildren.current.lanes = isStrictMode; + markRootUpdated(initialChildren, isStrictMode, identifierPrefix); + ensureRootIsScheduled(initialChildren, identifierPrefix); container[internalContainerInstanceKey] = initialChildren.current; Dispatcher.current = ReactDOMClientDispatcher; listenToAllSupportedEvents(container); @@ -14214,4 +14193,4 @@ exports.unstable_flushControlled = function (fn) { } }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-212b89fa2-20230221"; +exports.version = "18.3.0-next-c04b18070-20230222"; diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index 0585a4ce8c48e..8bc2f20081f32 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -3309,9 +3309,8 @@ function cloneUpdateQueue(current, workInProgress) { workInProgress.updateQueue = clone; } } -function createUpdate(eventTime, lane) { +function createUpdate(lane) { var update = { - eventTime: eventTime, lane: lane, tag: UpdateState, payload: null, @@ -3427,7 +3426,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { do { var clone = { - eventTime: update.eventTime, lane: update.lane, tag: update.tag, payload: update.payload, @@ -3620,11 +3618,9 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { var update = firstBaseUpdate; do { - // TODO: Don't need this field anymore - var updateEventTime = update.eventTime; // An extra OffscreenLane bit is added to updates that were made to + // An extra OffscreenLane bit is added to updates that were made to // a hidden tree, so that we can distinguish them from updates that were // already there when the tree was hidden. - var updateLane = removeLanes(update.lane, OffscreenLane); var isHiddenUpdate = updateLane !== update.lane; // Check if this update was made while the tree was hidden. If so, then // it's not a "base" update and we should disregard the extra base lanes @@ -3639,7 +3635,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // skipped update, the previous update/state is the new base // update/state. var clone = { - eventTime: updateEventTime, lane: updateLane, tag: update.tag, payload: update.payload, @@ -3659,7 +3654,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // This update does have sufficient priority. if (newLastBaseUpdate !== null) { var _clone = { - eventTime: updateEventTime, // This update is going to be committed so we never want uncommit // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. @@ -8024,11 +8018,11 @@ function refreshCache(fiber, seedKey, seedValue) { case HostRoot: { // Schedule an update on the cache boundary to trigger a refresh. var lane = requestUpdateLane(provider); - var eventTime = requestEventTime(); - var refreshUpdate = createUpdate(eventTime, lane); + var refreshUpdate = createUpdate(lane); var root = enqueueUpdate(provider, refreshUpdate, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, provider, lane, eventTime); entangleTransitions(root, provider, lane); } // TODO: If a refresh never commits, the new cache created here must be @@ -9493,9 +9487,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueSetState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.payload = payload; if (callback !== undefined && callback !== null) { @@ -9509,15 +9502,15 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } }, enqueueReplaceState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ReplaceState; update.payload = payload; @@ -9532,6 +9525,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -9539,9 +9533,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueForceUpdate: function (inst, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; if (callback !== undefined && callback !== null) { @@ -9555,6 +9548,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -10582,7 +10576,7 @@ function logCapturedError(boundary, errorInfo) { } function createRootErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null. + var update = createUpdate(lane); // Unmount the root by rendering null. update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property // being called "element". @@ -10601,7 +10595,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { } function createClassErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = CaptureUpdate; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; @@ -10744,7 +10738,7 @@ function markSuspenseBoundaryShouldCapture( // When we try rendering again, we should not reuse the current fiber, // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. - var update = createUpdate(NoTimestamp, SyncLane); + var update = createUpdate(SyncLane); update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } @@ -14378,7 +14372,7 @@ function propagateContextChange_eager(workInProgress, context, renderLanes) { if (fiber.tag === ClassComponent) { // Schedule a force update on the work-in-progress. var lane = pickArbitraryLane(renderLanes); - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the // update to the current fiber, too, which means it will persist even if // this render is thrown away. Since it's a race condition, not sure it's @@ -23749,7 +23743,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-212b89fa2-20230221"; +var ReactVersion = "18.3.0-www-classic-c04b18070-20230222"; // Might add PROFILE later. @@ -23808,7 +23802,6 @@ function updateContainer(element, container, parentComponent, callback) { } var current$1 = container.current; - var eventTime = requestEventTime(); var lane = requestUpdateLane(current$1); var context = getContextForSubtree(parentComponent); @@ -23833,7 +23826,7 @@ function updateContainer(element, container, parentComponent, callback) { } } - var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property + var update = createUpdate(lane); // Caution: React DevTools currently depends on this property // being called "element". update.payload = { @@ -23858,6 +23851,7 @@ function updateContainer(element, container, parentComponent, callback) { var root = enqueueUpdate(current$1, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, current$1, lane, eventTime); entangleTransitions(root, current$1, lane); } diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index 5a0fef9b69dc1..ff5d01f1e847e 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -3309,9 +3309,8 @@ function cloneUpdateQueue(current, workInProgress) { workInProgress.updateQueue = clone; } } -function createUpdate(eventTime, lane) { +function createUpdate(lane) { var update = { - eventTime: eventTime, lane: lane, tag: UpdateState, payload: null, @@ -3427,7 +3426,6 @@ function enqueueCapturedUpdate(workInProgress, capturedUpdate) { do { var clone = { - eventTime: update.eventTime, lane: update.lane, tag: update.tag, payload: update.payload, @@ -3620,11 +3618,9 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { var update = firstBaseUpdate; do { - // TODO: Don't need this field anymore - var updateEventTime = update.eventTime; // An extra OffscreenLane bit is added to updates that were made to + // An extra OffscreenLane bit is added to updates that were made to // a hidden tree, so that we can distinguish them from updates that were // already there when the tree was hidden. - var updateLane = removeLanes(update.lane, OffscreenLane); var isHiddenUpdate = updateLane !== update.lane; // Check if this update was made while the tree was hidden. If so, then // it's not a "base" update and we should disregard the extra base lanes @@ -3639,7 +3635,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // skipped update, the previous update/state is the new base // update/state. var clone = { - eventTime: updateEventTime, lane: updateLane, tag: update.tag, payload: update.payload, @@ -3659,7 +3654,6 @@ function processUpdateQueue(workInProgress, props, instance, renderLanes) { // This update does have sufficient priority. if (newLastBaseUpdate !== null) { var _clone = { - eventTime: updateEventTime, // This update is going to be committed so we never want uncommit // it. Using NoLane works because 0 is a subset of all bitmasks, so // this will never be skipped by the check above. @@ -8024,11 +8018,11 @@ function refreshCache(fiber, seedKey, seedValue) { case HostRoot: { // Schedule an update on the cache boundary to trigger a refresh. var lane = requestUpdateLane(provider); - var eventTime = requestEventTime(); - var refreshUpdate = createUpdate(eventTime, lane); + var refreshUpdate = createUpdate(lane); var root = enqueueUpdate(provider, refreshUpdate, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, provider, lane, eventTime); entangleTransitions(root, provider, lane); } // TODO: If a refresh never commits, the new cache created here must be @@ -9493,9 +9487,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueSetState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.payload = payload; if (callback !== undefined && callback !== null) { @@ -9509,15 +9502,15 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } }, enqueueReplaceState: function (inst, payload, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ReplaceState; update.payload = payload; @@ -9532,6 +9525,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -9539,9 +9533,8 @@ var classComponentUpdater = { // $FlowFixMe[missing-local-annot] enqueueForceUpdate: function (inst, callback) { var fiber = get(inst); - var eventTime = requestEventTime(); var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; if (callback !== undefined && callback !== null) { @@ -9555,6 +9548,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, fiber, lane, eventTime); entangleTransitions(root, fiber, lane); } @@ -10582,7 +10576,7 @@ function logCapturedError(boundary, errorInfo) { } function createRootErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null. + var update = createUpdate(lane); // Unmount the root by rendering null. update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property // being called "element". @@ -10601,7 +10595,7 @@ function createRootErrorUpdate(fiber, errorInfo, lane) { } function createClassErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = CaptureUpdate; var getDerivedStateFromError = fiber.type.getDerivedStateFromError; @@ -10744,7 +10738,7 @@ function markSuspenseBoundaryShouldCapture( // When we try rendering again, we should not reuse the current fiber, // since it's known to be in an inconsistent state. Use a force update to // prevent a bail out. - var update = createUpdate(NoTimestamp, SyncLane); + var update = createUpdate(SyncLane); update.tag = ForceUpdate; enqueueUpdate(sourceFiber, update, SyncLane); } @@ -14378,7 +14372,7 @@ function propagateContextChange_eager(workInProgress, context, renderLanes) { if (fiber.tag === ClassComponent) { // Schedule a force update on the work-in-progress. var lane = pickArbitraryLane(renderLanes); - var update = createUpdate(NoTimestamp, lane); + var update = createUpdate(lane); update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the // update to the current fiber, too, which means it will persist even if // this render is thrown away. Since it's a race condition, not sure it's @@ -23749,7 +23743,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-212b89fa2-20230221"; +var ReactVersion = "18.3.0-www-modern-c04b18070-20230222"; // Might add PROFILE later. @@ -23808,7 +23802,6 @@ function updateContainer(element, container, parentComponent, callback) { } var current$1 = container.current; - var eventTime = requestEventTime(); var lane = requestUpdateLane(current$1); var context = getContextForSubtree(parentComponent); @@ -23833,7 +23826,7 @@ function updateContainer(element, container, parentComponent, callback) { } } - var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property + var update = createUpdate(lane); // Caution: React DevTools currently depends on this property // being called "element". update.payload = { @@ -23858,6 +23851,7 @@ function updateContainer(element, container, parentComponent, callback) { var root = enqueueUpdate(current$1, update, lane); if (root !== null) { + var eventTime = requestEventTime(); scheduleUpdateOnFiber(root, current$1, lane, eventTime); entangleTransitions(root, current$1, lane); }