Skip to content

Commit 34cf2ef

Browse files
committed
Revert "Revert "[Float] Suspend unstyled content for up to 1 minute (#26532)""
This reverts commit 314f7d3. DiffTrain build for [7eca717](7eca717)
1 parent d05978b commit 34cf2ef

15 files changed

+174
-164
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f9231793c57da481cc2030b77f9806cd4dc156f0
1+
7eca7179173c91d3a3501140df0afd45886d1769

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-www-modern-8b241311";
30+
var ReactVersion = "18.3.0-www-modern-3b6fb960";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
6969
return self;
7070
}
7171

72-
var ReactVersion = "18.3.0-www-classic-a86bcc37";
72+
var ReactVersion = "18.3.0-www-classic-8960db8a";
7373

7474
var LegacyRoot = 0;
7575
var ConcurrentRoot = 1;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9723,7 +9723,7 @@ var slice = Array.prototype.slice,
97239723
return null;
97249724
},
97259725
bundleType: 0,
9726-
version: "18.3.0-www-modern-feebe80d",
9726+
version: "18.3.0-www-modern-79c13b02",
97279727
rendererPackageName: "react-art"
97289728
};
97299729
var internals$jscomp$inline_1322 = {
@@ -9754,7 +9754,7 @@ var internals$jscomp$inline_1322 = {
97549754
scheduleRoot: null,
97559755
setRefreshHandler: null,
97569756
getCurrentFiber: null,
9757-
reconcilerVersion: "18.3.0-www-modern-feebe80d"
9757+
reconcilerVersion: "18.3.0-www-modern-79c13b02"
97589758
};
97599759
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
97609760
var hook$jscomp$inline_1323 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

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

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33883,7 +33883,7 @@ function createFiberRoot(
3388333883
return root;
3388433884
}
3388533885

33886-
var ReactVersion = "18.3.0-www-classic-000b299c";
33886+
var ReactVersion = "18.3.0-www-classic-838e60a2";
3388733887

3388833888
function createPortal$1(
3388933889
children,
@@ -43142,31 +43142,35 @@ function waitForCommitToBeReady() {
4314243142

4314343143
if (state.count > 0) {
4314443144
return function (commit) {
43145-
unsuspendAfterTimeout(state);
43145+
// We almost never want to show content before its styles have loaded. But
43146+
// eventually we will give up and allow unstyled content. So this number is
43147+
// somewhat arbitrary — big enough that you'd only reach it under
43148+
// extreme circumstances.
43149+
// TODO: Figure out what the browser engines do during initial page load and
43150+
// consider aligning our behavior with that.
43151+
var stylesheetTimer = setTimeout(function () {
43152+
if (state.stylesheets) {
43153+
insertSuspendedStylesheets(state, state.stylesheets);
43154+
}
43155+
43156+
if (state.unsuspend) {
43157+
var unsuspend = state.unsuspend;
43158+
state.unsuspend = null;
43159+
unsuspend();
43160+
}
43161+
}, 60000); // one minute
43162+
4314643163
state.unsuspend = commit;
4314743164
return function () {
43148-
return (state.unsuspend = null);
43165+
state.unsuspend = null;
43166+
clearTimeout(stylesheetTimer);
4314943167
};
4315043168
};
4315143169
}
4315243170

4315343171
return null;
4315443172
}
4315543173

43156-
function unsuspendAfterTimeout(state) {
43157-
setTimeout(function () {
43158-
if (state.stylesheets) {
43159-
insertSuspendedStylesheets(state, state.stylesheets);
43160-
}
43161-
43162-
if (state.unsuspend) {
43163-
var unsuspend = state.unsuspend;
43164-
state.unsuspend = null;
43165-
unsuspend();
43166-
}
43167-
}, 500);
43168-
}
43169-
4317043174
function onUnsuspend() {
4317143175
this.count--;
4317243176

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

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33722,7 +33722,7 @@ function createFiberRoot(
3372233722
return root;
3372333723
}
3372433724

33725-
var ReactVersion = "18.3.0-www-modern-feebe80d";
33725+
var ReactVersion = "18.3.0-www-modern-79c13b02";
3372633726

3372733727
function createPortal$1(
3372833728
children,
@@ -43690,31 +43690,35 @@ function waitForCommitToBeReady() {
4369043690

4369143691
if (state.count > 0) {
4369243692
return function (commit) {
43693-
unsuspendAfterTimeout(state);
43693+
// We almost never want to show content before its styles have loaded. But
43694+
// eventually we will give up and allow unstyled content. So this number is
43695+
// somewhat arbitrary — big enough that you'd only reach it under
43696+
// extreme circumstances.
43697+
// TODO: Figure out what the browser engines do during initial page load and
43698+
// consider aligning our behavior with that.
43699+
var stylesheetTimer = setTimeout(function () {
43700+
if (state.stylesheets) {
43701+
insertSuspendedStylesheets(state, state.stylesheets);
43702+
}
43703+
43704+
if (state.unsuspend) {
43705+
var unsuspend = state.unsuspend;
43706+
state.unsuspend = null;
43707+
unsuspend();
43708+
}
43709+
}, 60000); // one minute
43710+
4369443711
state.unsuspend = commit;
4369543712
return function () {
43696-
return (state.unsuspend = null);
43713+
state.unsuspend = null;
43714+
clearTimeout(stylesheetTimer);
4369743715
};
4369843716
};
4369943717
}
4370043718

4370143719
return null;
4370243720
}
4370343721

43704-
function unsuspendAfterTimeout(state) {
43705-
setTimeout(function () {
43706-
if (state.stylesheets) {
43707-
insertSuspendedStylesheets(state, state.stylesheets);
43708-
}
43709-
43710-
if (state.unsuspend) {
43711-
var unsuspend = state.unsuspend;
43712-
state.unsuspend = null;
43713-
unsuspend();
43714-
}
43715-
}, 500);
43716-
}
43717-
4371843722
function onUnsuspend() {
4371943723
this.count--;
4372043724

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

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15070,24 +15070,23 @@ function waitForCommitToBeReady() {
1507015070
insertSuspendedStylesheets(state, state.stylesheets);
1507115071
return 0 < state.count
1507215072
? function (commit) {
15073-
unsuspendAfterTimeout(state);
15073+
var stylesheetTimer = setTimeout(function () {
15074+
state.stylesheets &&
15075+
insertSuspendedStylesheets(state, state.stylesheets);
15076+
if (state.unsuspend) {
15077+
var unsuspend = state.unsuspend;
15078+
state.unsuspend = null;
15079+
unsuspend();
15080+
}
15081+
}, 6e4);
1507415082
state.unsuspend = commit;
1507515083
return function () {
15076-
return (state.unsuspend = null);
15084+
state.unsuspend = null;
15085+
clearTimeout(stylesheetTimer);
1507715086
};
1507815087
}
1507915088
: null;
1508015089
}
15081-
function unsuspendAfterTimeout(state) {
15082-
setTimeout(function () {
15083-
state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets);
15084-
if (state.unsuspend) {
15085-
var unsuspend = state.unsuspend;
15086-
state.unsuspend = null;
15087-
unsuspend();
15088-
}
15089-
}, 500);
15090-
}
1509115090
function onUnsuspend() {
1509215091
this.count--;
1509315092
if (0 === this.count)
@@ -15958,7 +15957,7 @@ Internals.Events = [
1595815957
var devToolsConfig$jscomp$inline_1810 = {
1595915958
findFiberByHostInstance: getClosestInstanceFromNode,
1596015959
bundleType: 0,
15961-
version: "18.3.0-www-classic-ecc92a93",
15960+
version: "18.3.0-www-classic-edf1acce",
1596215961
rendererPackageName: "react-dom"
1596315962
};
1596415963
var internals$jscomp$inline_2206 = {
@@ -15988,7 +15987,7 @@ var internals$jscomp$inline_2206 = {
1598815987
scheduleRoot: null,
1598915988
setRefreshHandler: null,
1599015989
getCurrentFiber: null,
15991-
reconcilerVersion: "18.3.0-www-classic-ecc92a93"
15990+
reconcilerVersion: "18.3.0-www-classic-edf1acce"
1599215991
};
1599315992
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1599415993
var hook$jscomp$inline_2207 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16228,4 +16227,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
1622816227
);
1622916228
};
1623016229
exports.unstable_runWithPriority = runWithPriority;
16231-
exports.version = "18.3.0-www-classic-ecc92a93";
16230+
exports.version = "18.3.0-www-classic-edf1acce";

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

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15319,24 +15319,23 @@ function waitForCommitToBeReady() {
1531915319
insertSuspendedStylesheets(state, state.stylesheets);
1532015320
return 0 < state.count
1532115321
? function (commit) {
15322-
unsuspendAfterTimeout(state);
15322+
var stylesheetTimer = setTimeout(function () {
15323+
state.stylesheets &&
15324+
insertSuspendedStylesheets(state, state.stylesheets);
15325+
if (state.unsuspend) {
15326+
var unsuspend = state.unsuspend;
15327+
state.unsuspend = null;
15328+
unsuspend();
15329+
}
15330+
}, 6e4);
1532315331
state.unsuspend = commit;
1532415332
return function () {
15325-
return (state.unsuspend = null);
15333+
state.unsuspend = null;
15334+
clearTimeout(stylesheetTimer);
1532615335
};
1532715336
}
1532815337
: null;
1532915338
}
15330-
function unsuspendAfterTimeout(state) {
15331-
setTimeout(function () {
15332-
state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets);
15333-
if (state.unsuspend) {
15334-
var unsuspend = state.unsuspend;
15335-
state.unsuspend = null;
15336-
unsuspend();
15337-
}
15338-
}, 500);
15339-
}
1534015339
function onUnsuspend() {
1534115340
this.count--;
1534215341
if (0 === this.count)
@@ -15485,7 +15484,7 @@ Internals.Events = [
1548515484
var devToolsConfig$jscomp$inline_1768 = {
1548615485
findFiberByHostInstance: getClosestInstanceFromNode,
1548715486
bundleType: 0,
15488-
version: "18.3.0-www-modern-1b7cf3c0",
15487+
version: "18.3.0-www-modern-0c23841c",
1548915488
rendererPackageName: "react-dom"
1549015489
};
1549115490
var internals$jscomp$inline_2169 = {
@@ -15516,7 +15515,7 @@ var internals$jscomp$inline_2169 = {
1551615515
scheduleRoot: null,
1551715516
setRefreshHandler: null,
1551815517
getCurrentFiber: null,
15519-
reconcilerVersion: "18.3.0-www-modern-1b7cf3c0"
15518+
reconcilerVersion: "18.3.0-www-modern-0c23841c"
1552015519
};
1552115520
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1552215521
var hook$jscomp$inline_2170 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15685,4 +15684,4 @@ exports.unstable_createEventHandle = function (type, options) {
1568515684
return eventHandle;
1568615685
};
1568715686
exports.unstable_runWithPriority = runWithPriority;
15688-
exports.version = "18.3.0-www-modern-1b7cf3c0";
15687+
exports.version = "18.3.0-www-modern-0c23841c";

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

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15844,24 +15844,23 @@ function waitForCommitToBeReady() {
1584415844
insertSuspendedStylesheets(state, state.stylesheets);
1584515845
return 0 < state.count
1584615846
? function (commit) {
15847-
unsuspendAfterTimeout(state);
15847+
var stylesheetTimer = setTimeout(function () {
15848+
state.stylesheets &&
15849+
insertSuspendedStylesheets(state, state.stylesheets);
15850+
if (state.unsuspend) {
15851+
var unsuspend = state.unsuspend;
15852+
state.unsuspend = null;
15853+
unsuspend();
15854+
}
15855+
}, 6e4);
1584815856
state.unsuspend = commit;
1584915857
return function () {
15850-
return (state.unsuspend = null);
15858+
state.unsuspend = null;
15859+
clearTimeout(stylesheetTimer);
1585115860
};
1585215861
}
1585315862
: null;
1585415863
}
15855-
function unsuspendAfterTimeout(state) {
15856-
setTimeout(function () {
15857-
state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets);
15858-
if (state.unsuspend) {
15859-
var unsuspend = state.unsuspend;
15860-
state.unsuspend = null;
15861-
unsuspend();
15862-
}
15863-
}, 500);
15864-
}
1586515864
function onUnsuspend() {
1586615865
this.count--;
1586715866
if (0 === this.count)
@@ -16732,7 +16731,7 @@ Internals.Events = [
1673216731
var devToolsConfig$jscomp$inline_1889 = {
1673316732
findFiberByHostInstance: getClosestInstanceFromNode,
1673416733
bundleType: 0,
16735-
version: "18.3.0-www-classic-68d19c91",
16734+
version: "18.3.0-www-classic-cf74bdbb",
1673616735
rendererPackageName: "react-dom"
1673716736
};
1673816737
(function (internals) {
@@ -16776,7 +16775,7 @@ var devToolsConfig$jscomp$inline_1889 = {
1677616775
scheduleRoot: null,
1677716776
setRefreshHandler: null,
1677816777
getCurrentFiber: null,
16779-
reconcilerVersion: "18.3.0-www-classic-68d19c91"
16778+
reconcilerVersion: "18.3.0-www-classic-cf74bdbb"
1678016779
});
1678116780
assign(Internals, {
1678216781
ReactBrowserEventEmitter: {
@@ -17003,7 +17002,7 @@ exports.unstable_renderSubtreeIntoContainer = function (
1700317002
);
1700417003
};
1700517004
exports.unstable_runWithPriority = runWithPriority;
17006-
exports.version = "18.3.0-www-classic-68d19c91";
17005+
exports.version = "18.3.0-www-classic-cf74bdbb";
1700717006

1700817007
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
1700917008
if (

0 commit comments

Comments
 (0)