|
7 | 7 | * @noflow |
8 | 8 | * @nolint |
9 | 9 | * @preventMunge |
10 | | - * @generated SignedSource<<c3ec935f7569a8a6d52e0966b2837ffe>> |
| 10 | + * @generated SignedSource<<000c06a477839c734ee52d10d49394b6>> |
11 | 11 | */ |
12 | 12 |
|
13 | 13 | 'use strict'; |
@@ -562,6 +562,11 @@ var PassiveMask = Passive$1 | Visibility | ChildDeletion; // Union of tags that |
562 | 562 |
|
563 | 563 | var StaticMask = LayoutStatic | PassiveStatic | RefStatic | MaySuspendCommit; |
564 | 564 |
|
| 565 | +var currentOwner = null; |
| 566 | +function setCurrentOwner(fiber) { |
| 567 | + currentOwner = fiber; |
| 568 | +} |
| 569 | + |
565 | 570 | function getNearestMountedFiber(fiber) { |
566 | 571 | var node = fiber; |
567 | 572 | var nearestMounted = fiber; |
@@ -605,7 +610,7 @@ function isFiberMounted(fiber) { |
605 | 610 | } |
606 | 611 | function isMounted(component) { |
607 | 612 | { |
608 | | - var owner = ReactSharedInternals.owner; |
| 613 | + var owner = currentOwner; |
609 | 614 |
|
610 | 615 | if (owner !== null && owner.tag === ClassComponent) { |
611 | 616 | var ownerFiber = owner; |
@@ -11897,7 +11902,7 @@ function updateForwardRef(current, workInProgress, Component, nextProps, renderL |
11897 | 11902 | } |
11898 | 11903 |
|
11899 | 11904 | { |
11900 | | - ReactSharedInternals.owner = workInProgress; |
| 11905 | + setCurrentOwner(workInProgress); |
11901 | 11906 | setIsRendering(true); |
11902 | 11907 | nextChildren = renderWithHooks(current, workInProgress, render, propsWithoutRef, ref, renderLanes); |
11903 | 11908 | setIsRendering(false); |
@@ -12380,7 +12385,7 @@ function updateFunctionComponent(current, workInProgress, Component, nextProps, |
12380 | 12385 | } |
12381 | 12386 |
|
12382 | 12387 | { |
12383 | | - ReactSharedInternals.owner = workInProgress; |
| 12388 | + setCurrentOwner(workInProgress); |
12384 | 12389 | setIsRendering(true); |
12385 | 12390 | nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes); |
12386 | 12391 | setIsRendering(false); |
@@ -12532,7 +12537,7 @@ function finishClassComponent(current, workInProgress, Component, shouldUpdate, |
12532 | 12537 | var instance = workInProgress.stateNode; // Rerender |
12533 | 12538 |
|
12534 | 12539 | { |
12535 | | - ReactSharedInternals.owner = workInProgress; |
| 12540 | + setCurrentOwner(workInProgress); |
12536 | 12541 | } |
12537 | 12542 |
|
12538 | 12543 | var nextChildren; |
@@ -13851,7 +13856,7 @@ function updateContextConsumer(current, workInProgress, renderLanes) { |
13851 | 13856 | var newChildren; |
13852 | 13857 |
|
13853 | 13858 | { |
13854 | | - ReactSharedInternals.owner = workInProgress; |
| 13859 | + setCurrentOwner(workInProgress); |
13855 | 13860 | setIsRendering(true); |
13856 | 13861 | newChildren = render(newValue); |
13857 | 13862 | setIsRendering(false); |
@@ -19158,10 +19163,16 @@ function getCacheForType(resourceType) { |
19158 | 19163 | return cacheForType; |
19159 | 19164 | } |
19160 | 19165 |
|
19161 | | -var DefaultCacheDispatcher = { |
| 19166 | +var DefaultAsyncDispatcher = { |
19162 | 19167 | getCacheForType: getCacheForType |
19163 | 19168 | }; |
19164 | 19169 |
|
| 19170 | +{ |
| 19171 | + DefaultAsyncDispatcher.getOwner = function () { |
| 19172 | + return currentOwner; |
| 19173 | + }; |
| 19174 | +} |
| 19175 | + |
19165 | 19176 | if (typeof Symbol === 'function' && Symbol.for) { |
19166 | 19177 | var symbolFor = Symbol.for; |
19167 | 19178 | symbolFor('selector.component'); |
@@ -20114,7 +20125,7 @@ function handleThrow(root, thrownValue) { |
20114 | 20125 | resetCurrentFiber(); |
20115 | 20126 |
|
20116 | 20127 | { |
20117 | | - ReactSharedInternals.owner = null; |
| 20128 | + setCurrentOwner(null); |
20118 | 20129 | } |
20119 | 20130 |
|
20120 | 20131 | if (thrownValue === SuspenseException) { |
@@ -20270,17 +20281,17 @@ function popDispatcher(prevDispatcher) { |
20270 | 20281 | ReactSharedInternals.H = prevDispatcher; |
20271 | 20282 | } |
20272 | 20283 |
|
20273 | | -function pushCacheDispatcher() { |
| 20284 | +function pushAsyncDispatcher() { |
20274 | 20285 | { |
20275 | | - var prevCacheDispatcher = ReactSharedInternals.C; |
20276 | | - ReactSharedInternals.C = DefaultCacheDispatcher; |
20277 | | - return prevCacheDispatcher; |
| 20286 | + var prevAsyncDispatcher = ReactSharedInternals.A; |
| 20287 | + ReactSharedInternals.A = DefaultAsyncDispatcher; |
| 20288 | + return prevAsyncDispatcher; |
20278 | 20289 | } |
20279 | 20290 | } |
20280 | 20291 |
|
20281 | | -function popCacheDispatcher(prevCacheDispatcher) { |
| 20292 | +function popAsyncDispatcher(prevAsyncDispatcher) { |
20282 | 20293 | { |
20283 | | - ReactSharedInternals.C = prevCacheDispatcher; |
| 20294 | + ReactSharedInternals.A = prevAsyncDispatcher; |
20284 | 20295 | } |
20285 | 20296 | } |
20286 | 20297 |
|
@@ -20338,7 +20349,7 @@ function renderRootSync(root, lanes) { |
20338 | 20349 | var prevExecutionContext = executionContext; |
20339 | 20350 | executionContext |= RenderContext; |
20340 | 20351 | var prevDispatcher = pushDispatcher(); |
20341 | | - var prevCacheDispatcher = pushCacheDispatcher(); // If the root or lanes have changed, throw out the existing stack |
| 20352 | + var prevAsyncDispatcher = pushAsyncDispatcher(); // If the root or lanes have changed, throw out the existing stack |
20342 | 20353 | // and prepare a fresh one. Otherwise we'll continue where we left off. |
20343 | 20354 |
|
20344 | 20355 | if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) { |
@@ -20418,7 +20429,7 @@ function renderRootSync(root, lanes) { |
20418 | 20429 | resetContextDependencies(); |
20419 | 20430 | executionContext = prevExecutionContext; |
20420 | 20431 | popDispatcher(prevDispatcher); |
20421 | | - popCacheDispatcher(prevCacheDispatcher); |
| 20432 | + popAsyncDispatcher(prevAsyncDispatcher); |
20422 | 20433 |
|
20423 | 20434 | if (workInProgress !== null) { |
20424 | 20435 | // This is a sync render, so we should have finished the whole tree. |
@@ -20451,7 +20462,7 @@ function renderRootConcurrent(root, lanes) { |
20451 | 20462 | var prevExecutionContext = executionContext; |
20452 | 20463 | executionContext |= RenderContext; |
20453 | 20464 | var prevDispatcher = pushDispatcher(); |
20454 | | - var prevCacheDispatcher = pushCacheDispatcher(); // If the root or lanes have changed, throw out the existing stack |
| 20465 | + var prevAsyncDispatcher = pushAsyncDispatcher(); // If the root or lanes have changed, throw out the existing stack |
20455 | 20466 | // and prepare a fresh one. Otherwise we'll continue where we left off. |
20456 | 20467 |
|
20457 | 20468 | if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) { |
@@ -20664,7 +20675,7 @@ function renderRootConcurrent(root, lanes) { |
20664 | 20675 |
|
20665 | 20676 | resetContextDependencies(); |
20666 | 20677 | popDispatcher(prevDispatcher); |
20667 | | - popCacheDispatcher(prevCacheDispatcher); |
| 20678 | + popAsyncDispatcher(prevAsyncDispatcher); |
20668 | 20679 | executionContext = prevExecutionContext; |
20669 | 20680 |
|
20670 | 20681 |
|
@@ -20728,7 +20739,7 @@ function performUnitOfWork(unitOfWork) { |
20728 | 20739 | } |
20729 | 20740 |
|
20730 | 20741 | { |
20731 | | - ReactSharedInternals.owner = null; |
| 20742 | + setCurrentOwner(null); |
20732 | 20743 | } |
20733 | 20744 | } |
20734 | 20745 |
|
@@ -20828,7 +20839,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { |
20828 | 20839 | } |
20829 | 20840 |
|
20830 | 20841 | { |
20831 | | - ReactSharedInternals.owner = null; |
| 20842 | + setCurrentOwner(null); |
20832 | 20843 | } |
20833 | 20844 | } |
20834 | 20845 |
|
@@ -21156,7 +21167,7 @@ function commitRootImpl(root, recoverableErrors, transitions, didIncludeRenderPh |
21156 | 21167 | executionContext |= CommitContext; // Reset this to null before calling lifecycles |
21157 | 21168 |
|
21158 | 21169 | { |
21159 | | - ReactSharedInternals.owner = null; |
| 21170 | + setCurrentOwner(null); |
21160 | 21171 | } // The commit phase is broken into several sub-phases. We do a separate pass |
21161 | 21172 | // of the effect list for each phase: all mutation effects come before all |
21162 | 21173 | // layout effects, and so on. |
@@ -22978,7 +22989,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition |
22978 | 22989 | return root; |
22979 | 22990 | } |
22980 | 22991 |
|
22981 | | -var ReactVersion = '19.0.0-beta-6e32de0b'; |
| 22992 | +var ReactVersion = '19.0.0-beta-fd8f46d6'; |
22982 | 22993 |
|
22983 | 22994 | /* |
22984 | 22995 | * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol |
|
0 commit comments