Skip to content

Commit 17a25cf

Browse files
committed
Implement ActivityInstance in FiberConfigDOM (facebook#32842)
Stacked on facebook#32851 and facebook#32900. This implements the equivalent Configs for ActivityInstance as we have for SuspenseInstance. These can be implemented as comments but they don't have to be and can be implemented differently in the renderer. This seems like a lot duplication but it's actually ends mostly just calling the same methods underneath and the wrappers compiles out. This doesn't leave the Activity dehydrated yet. It just hydrates into it immediately. DiffTrain build for [17f88c8](facebook@17f88c8)
1 parent 3e2ab80 commit 17a25cf

37 files changed

+3399
-2352
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ce578f9c59be73e6e32c633e6d251e8ec6dcad84
1+
17f88c80ed20b4e5f21255d9e1268542a2fbc1bd
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ce578f9c59be73e6e32c633e6d251e8ec6dcad84
1+
17f88c80ed20b4e5f21255d9e1268542a2fbc1bd

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ __DEV__ &&
15381538
exports.useTransition = function () {
15391539
return resolveDispatcher().useTransition();
15401540
};
1541-
exports.version = "19.2.0-www-classic-ce578f9c-20250417";
1541+
exports.version = "19.2.0-www-classic-17f88c80-20250422";
15421542
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15431543
"function" ===
15441544
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ __DEV__ &&
15381538
exports.useTransition = function () {
15391539
return resolveDispatcher().useTransition();
15401540
};
1541-
exports.version = "19.2.0-www-modern-ce578f9c-20250417";
1541+
exports.version = "19.2.0-www-modern-17f88c80-20250422";
15421542
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15431543
"function" ===
15441544
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,4 +636,4 @@ exports.useSyncExternalStore = function (
636636
exports.useTransition = function () {
637637
return ReactSharedInternals.H.useTransition();
638638
};
639-
exports.version = "19.2.0-www-classic-ce578f9c-20250417";
639+
exports.version = "19.2.0-www-classic-17f88c80-20250422";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,4 +636,4 @@ exports.useSyncExternalStore = function (
636636
exports.useTransition = function () {
637637
return ReactSharedInternals.H.useTransition();
638638
};
639-
exports.version = "19.2.0-www-modern-ce578f9c-20250417";
639+
exports.version = "19.2.0-www-modern-17f88c80-20250422";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ exports.useSyncExternalStore = function (
640640
exports.useTransition = function () {
641641
return ReactSharedInternals.H.useTransition();
642642
};
643-
exports.version = "19.2.0-www-classic-ce578f9c-20250417";
643+
exports.version = "19.2.0-www-classic-17f88c80-20250422";
644644
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
645645
"function" ===
646646
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ exports.useSyncExternalStore = function (
640640
exports.useTransition = function () {
641641
return ReactSharedInternals.H.useTransition();
642642
};
643-
exports.version = "19.2.0-www-modern-ce578f9c-20250417";
643+
exports.version = "19.2.0-www-modern-17f88c80-20250422";
644644
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
645645
"function" ===
646646
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,8 @@ __DEV__ &&
14121412
return fiber.type;
14131413
case 16:
14141414
return "Lazy";
1415+
case 31:
1416+
return "Activity";
14151417
case 13:
14161418
return "Suspense";
14171419
case 19:
@@ -4539,18 +4541,11 @@ __DEV__ &&
45394541
);
45404542
}
45414543
function pushOffscreenSuspenseHandler(fiber) {
4542-
if (22 === fiber.tag) {
4543-
if (
4544-
(push(suspenseStackCursor, suspenseStackCursor.current, fiber),
4544+
22 === fiber.tag
4545+
? (push(suspenseStackCursor, suspenseStackCursor.current, fiber),
45454546
push(suspenseHandlerStackCursor, fiber, fiber),
4546-
null === shellBoundary)
4547-
) {
4548-
var current = fiber.alternate;
4549-
null !== current &&
4550-
null !== current.memoizedState &&
4551-
(shellBoundary = fiber);
4552-
}
4553-
} else reuseSuspenseHandlerOnStack(fiber);
4547+
null === shellBoundary && (shellBoundary = fiber))
4548+
: reuseSuspenseHandlerOnStack(fiber);
45544549
}
45554550
function reuseSuspenseHandlerOnStack(fiber) {
45564551
push(suspenseStackCursor, suspenseStackCursor.current, fiber);
@@ -9357,7 +9352,6 @@ __DEV__ &&
93579352
function completeWork(current, workInProgress, renderLanes) {
93589353
var newProps = workInProgress.pendingProps;
93599354
switch (workInProgress.tag) {
9360-
case 31:
93619355
case 16:
93629356
case 15:
93639357
case 0:
@@ -9505,6 +9499,8 @@ __DEV__ &&
95059499
}
95069500
bubbleProperties(workInProgress);
95079501
return null;
9502+
case 31:
9503+
return bubbleProperties(workInProgress), null;
95089504
case 13:
95099505
newProps = workInProgress.memoizedState;
95109506
if (
@@ -11923,6 +11919,26 @@ __DEV__ &&
1192311919
captureCommitPhaseError(lanes, lanes.return, error);
1192411920
}
1192511921
}
11922+
} else if (18 === root.tag) {
11923+
if (null === current) {
11924+
lanes = root;
11925+
try {
11926+
var instance$jscomp$0 = lanes.stateNode;
11927+
suspenseCallback
11928+
? runWithFiberInDEV(
11929+
lanes,
11930+
hideDehydratedBoundary,
11931+
instance$jscomp$0
11932+
)
11933+
: runWithFiberInDEV(
11934+
lanes,
11935+
unhideDehydratedBoundary,
11936+
lanes.stateNode
11937+
);
11938+
} catch (error) {
11939+
captureCommitPhaseError(lanes, lanes.return, error);
11940+
}
11941+
}
1192611942
} else if (
1192711943
((22 !== root.tag && 23 !== root.tag) ||
1192811944
null === root.memoizedState ||
@@ -16416,6 +16432,8 @@ __DEV__ &&
1641616432
registerSuspenseInstanceRetry = shim$2,
1641716433
clearSuspenseBoundary = shim$2,
1641816434
clearSuspenseBoundaryFromContainer = shim$2,
16435+
hideDehydratedBoundary = shim$2,
16436+
unhideDehydratedBoundary = shim$2,
1641916437
prepareScopeUpdate = shim$1,
1642016438
getInstanceFromScope = shim$1,
1642116439
preloadResource = shim,
@@ -18558,10 +18576,10 @@ __DEV__ &&
1855818576
(function () {
1855918577
var internals = {
1856018578
bundleType: 1,
18561-
version: "19.2.0-www-classic-ce578f9c-20250417",
18579+
version: "19.2.0-www-classic-17f88c80-20250422",
1856218580
rendererPackageName: "react-art",
1856318581
currentDispatcherRef: ReactSharedInternals,
18564-
reconcilerVersion: "19.2.0-www-classic-ce578f9c-20250417"
18582+
reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422"
1856518583
};
1856618584
internals.overrideHookState = overrideHookState;
1856718585
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18595,7 +18613,7 @@ __DEV__ &&
1859518613
exports.Shape = Shape;
1859618614
exports.Surface = Surface;
1859718615
exports.Text = Text;
18598-
exports.version = "19.2.0-www-classic-ce578f9c-20250417";
18616+
exports.version = "19.2.0-www-classic-17f88c80-20250422";
1859918617
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1860018618
"function" ===
1860118619
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,6 +1318,8 @@ __DEV__ &&
13181318
return fiber.type;
13191319
case 16:
13201320
return "Lazy";
1321+
case 31:
1322+
return "Activity";
13211323
case 13:
13221324
return "Suspense";
13231325
case 19:
@@ -4445,18 +4447,11 @@ __DEV__ &&
44454447
);
44464448
}
44474449
function pushOffscreenSuspenseHandler(fiber) {
4448-
if (22 === fiber.tag) {
4449-
if (
4450-
(push(suspenseStackCursor, suspenseStackCursor.current, fiber),
4450+
22 === fiber.tag
4451+
? (push(suspenseStackCursor, suspenseStackCursor.current, fiber),
44514452
push(suspenseHandlerStackCursor, fiber, fiber),
4452-
null === shellBoundary)
4453-
) {
4454-
var current = fiber.alternate;
4455-
null !== current &&
4456-
null !== current.memoizedState &&
4457-
(shellBoundary = fiber);
4458-
}
4459-
} else reuseSuspenseHandlerOnStack(fiber);
4453+
null === shellBoundary && (shellBoundary = fiber))
4454+
: reuseSuspenseHandlerOnStack(fiber);
44604455
}
44614456
function reuseSuspenseHandlerOnStack(fiber) {
44624457
push(suspenseStackCursor, suspenseStackCursor.current, fiber);
@@ -9189,7 +9184,6 @@ __DEV__ &&
91899184
function completeWork(current, workInProgress, renderLanes) {
91909185
var newProps = workInProgress.pendingProps;
91919186
switch (workInProgress.tag) {
9192-
case 31:
91939187
case 16:
91949188
case 15:
91959189
case 0:
@@ -9331,6 +9325,8 @@ __DEV__ &&
93319325
}
93329326
bubbleProperties(workInProgress);
93339327
return null;
9328+
case 31:
9329+
return bubbleProperties(workInProgress), null;
93349330
case 13:
93359331
newProps = workInProgress.memoizedState;
93369332
if (
@@ -11741,6 +11737,26 @@ __DEV__ &&
1174111737
captureCommitPhaseError(lanes, lanes.return, error);
1174211738
}
1174311739
}
11740+
} else if (18 === root.tag) {
11741+
if (null === current) {
11742+
lanes = root;
11743+
try {
11744+
var instance$jscomp$0 = lanes.stateNode;
11745+
suspenseCallback
11746+
? runWithFiberInDEV(
11747+
lanes,
11748+
hideDehydratedBoundary,
11749+
instance$jscomp$0
11750+
)
11751+
: runWithFiberInDEV(
11752+
lanes,
11753+
unhideDehydratedBoundary,
11754+
lanes.stateNode
11755+
);
11756+
} catch (error) {
11757+
captureCommitPhaseError(lanes, lanes.return, error);
11758+
}
11759+
}
1174411760
} else if (
1174511761
((22 !== root.tag && 23 !== root.tag) ||
1174611762
null === root.memoizedState ||
@@ -16193,6 +16209,8 @@ __DEV__ &&
1619316209
registerSuspenseInstanceRetry = shim$2,
1619416210
clearSuspenseBoundary = shim$2,
1619516211
clearSuspenseBoundaryFromContainer = shim$2,
16212+
hideDehydratedBoundary = shim$2,
16213+
unhideDehydratedBoundary = shim$2,
1619616214
prepareScopeUpdate = shim$1,
1619716215
getInstanceFromScope = shim$1,
1619816216
preloadResource = shim,
@@ -18330,10 +18348,10 @@ __DEV__ &&
1833018348
(function () {
1833118349
var internals = {
1833218350
bundleType: 1,
18333-
version: "19.2.0-www-modern-ce578f9c-20250417",
18351+
version: "19.2.0-www-modern-17f88c80-20250422",
1833418352
rendererPackageName: "react-art",
1833518353
currentDispatcherRef: ReactSharedInternals,
18336-
reconcilerVersion: "19.2.0-www-modern-ce578f9c-20250417"
18354+
reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422"
1833718355
};
1833818356
internals.overrideHookState = overrideHookState;
1833918357
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18367,7 +18385,7 @@ __DEV__ &&
1836718385
exports.Shape = Shape;
1836818386
exports.Surface = Surface;
1836918387
exports.Text = Text;
18370-
exports.version = "19.2.0-www-modern-ce578f9c-20250417";
18388+
exports.version = "19.2.0-www-modern-17f88c80-20250422";
1837118389
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1837218390
"function" ===
1837318391
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)