Skip to content

Commit

Permalink
Revert "Revert "[Float] Suspend unstyled content for up to 1 minute (#…
Browse files Browse the repository at this point in the history
…26532)""

This reverts commit 314f7d3.

DiffTrain build for [7eca717](7eca717)
  • Loading branch information
kassens committed Apr 19, 2023
1 parent d05978b commit 34cf2ef
Show file tree
Hide file tree
Showing 15 changed files with 174 additions and 164 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f9231793c57da481cc2030b77f9806cd4dc156f0
7eca7179173c91d3a3501140df0afd45886d1769
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

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

// ATTENTION
// When adding new symbols to this file,
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}

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

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -9723,7 +9723,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-modern-feebe80d",
version: "18.3.0-www-modern-79c13b02",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1322 = {
Expand Down Expand Up @@ -9754,7 +9754,7 @@ var internals$jscomp$inline_1322 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-feebe80d"
reconcilerVersion: "18.3.0-www-modern-79c13b02"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1323 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
38 changes: 21 additions & 17 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -33883,7 +33883,7 @@ function createFiberRoot(
return root;
}

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

function createPortal$1(
children,
Expand Down Expand Up @@ -43142,31 +43142,35 @@ function waitForCommitToBeReady() {

if (state.count > 0) {
return function (commit) {
unsuspendAfterTimeout(state);
// We almost never want to show content before its styles have loaded. But
// eventually we will give up and allow unstyled content. So this number is
// somewhat arbitrary — big enough that you'd only reach it under
// extreme circumstances.
// TODO: Figure out what the browser engines do during initial page load and
// consider aligning our behavior with that.
var stylesheetTimer = setTimeout(function () {
if (state.stylesheets) {
insertSuspendedStylesheets(state, state.stylesheets);
}

if (state.unsuspend) {
var unsuspend = state.unsuspend;
state.unsuspend = null;
unsuspend();
}
}, 60000); // one minute

state.unsuspend = commit;
return function () {
return (state.unsuspend = null);
state.unsuspend = null;
clearTimeout(stylesheetTimer);
};
};
}

return null;
}

function unsuspendAfterTimeout(state) {
setTimeout(function () {
if (state.stylesheets) {
insertSuspendedStylesheets(state, state.stylesheets);
}

if (state.unsuspend) {
var unsuspend = state.unsuspend;
state.unsuspend = null;
unsuspend();
}
}, 500);
}

function onUnsuspend() {
this.count--;

Expand Down
38 changes: 21 additions & 17 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -33722,7 +33722,7 @@ function createFiberRoot(
return root;
}

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

function createPortal$1(
children,
Expand Down Expand Up @@ -43690,31 +43690,35 @@ function waitForCommitToBeReady() {

if (state.count > 0) {
return function (commit) {
unsuspendAfterTimeout(state);
// We almost never want to show content before its styles have loaded. But
// eventually we will give up and allow unstyled content. So this number is
// somewhat arbitrary — big enough that you'd only reach it under
// extreme circumstances.
// TODO: Figure out what the browser engines do during initial page load and
// consider aligning our behavior with that.
var stylesheetTimer = setTimeout(function () {
if (state.stylesheets) {
insertSuspendedStylesheets(state, state.stylesheets);
}

if (state.unsuspend) {
var unsuspend = state.unsuspend;
state.unsuspend = null;
unsuspend();
}
}, 60000); // one minute

state.unsuspend = commit;
return function () {
return (state.unsuspend = null);
state.unsuspend = null;
clearTimeout(stylesheetTimer);
};
};
}

return null;
}

function unsuspendAfterTimeout(state) {
setTimeout(function () {
if (state.stylesheets) {
insertSuspendedStylesheets(state, state.stylesheets);
}

if (state.unsuspend) {
var unsuspend = state.unsuspend;
state.unsuspend = null;
unsuspend();
}
}, 500);
}

function onUnsuspend() {
this.count--;

Expand Down
29 changes: 14 additions & 15 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -15070,24 +15070,23 @@ function waitForCommitToBeReady() {
insertSuspendedStylesheets(state, state.stylesheets);
return 0 < state.count
? function (commit) {
unsuspendAfterTimeout(state);
var stylesheetTimer = setTimeout(function () {
state.stylesheets &&
insertSuspendedStylesheets(state, state.stylesheets);
if (state.unsuspend) {
var unsuspend = state.unsuspend;
state.unsuspend = null;
unsuspend();
}
}, 6e4);
state.unsuspend = commit;
return function () {
return (state.unsuspend = null);
state.unsuspend = null;
clearTimeout(stylesheetTimer);
};
}
: null;
}
function unsuspendAfterTimeout(state) {
setTimeout(function () {
state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets);
if (state.unsuspend) {
var unsuspend = state.unsuspend;
state.unsuspend = null;
unsuspend();
}
}, 500);
}
function onUnsuspend() {
this.count--;
if (0 === this.count)
Expand Down Expand Up @@ -15958,7 +15957,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1810 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-ecc92a93",
version: "18.3.0-www-classic-edf1acce",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2206 = {
Expand Down Expand Up @@ -15988,7 +15987,7 @@ var internals$jscomp$inline_2206 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-ecc92a93"
reconcilerVersion: "18.3.0-www-classic-edf1acce"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2207 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16228,4 +16227,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-classic-ecc92a93";
exports.version = "18.3.0-www-classic-edf1acce";
29 changes: 14 additions & 15 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -15319,24 +15319,23 @@ function waitForCommitToBeReady() {
insertSuspendedStylesheets(state, state.stylesheets);
return 0 < state.count
? function (commit) {
unsuspendAfterTimeout(state);
var stylesheetTimer = setTimeout(function () {
state.stylesheets &&
insertSuspendedStylesheets(state, state.stylesheets);
if (state.unsuspend) {
var unsuspend = state.unsuspend;
state.unsuspend = null;
unsuspend();
}
}, 6e4);
state.unsuspend = commit;
return function () {
return (state.unsuspend = null);
state.unsuspend = null;
clearTimeout(stylesheetTimer);
};
}
: null;
}
function unsuspendAfterTimeout(state) {
setTimeout(function () {
state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets);
if (state.unsuspend) {
var unsuspend = state.unsuspend;
state.unsuspend = null;
unsuspend();
}
}, 500);
}
function onUnsuspend() {
this.count--;
if (0 === this.count)
Expand Down Expand Up @@ -15485,7 +15484,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1768 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-1b7cf3c0",
version: "18.3.0-www-modern-0c23841c",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2169 = {
Expand Down Expand Up @@ -15516,7 +15515,7 @@ var internals$jscomp$inline_2169 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-1b7cf3c0"
reconcilerVersion: "18.3.0-www-modern-0c23841c"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2170 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -15685,4 +15684,4 @@ exports.unstable_createEventHandle = function (type, options) {
return eventHandle;
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-modern-1b7cf3c0";
exports.version = "18.3.0-www-modern-0c23841c";
29 changes: 14 additions & 15 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -15844,24 +15844,23 @@ function waitForCommitToBeReady() {
insertSuspendedStylesheets(state, state.stylesheets);
return 0 < state.count
? function (commit) {
unsuspendAfterTimeout(state);
var stylesheetTimer = setTimeout(function () {
state.stylesheets &&
insertSuspendedStylesheets(state, state.stylesheets);
if (state.unsuspend) {
var unsuspend = state.unsuspend;
state.unsuspend = null;
unsuspend();
}
}, 6e4);
state.unsuspend = commit;
return function () {
return (state.unsuspend = null);
state.unsuspend = null;
clearTimeout(stylesheetTimer);
};
}
: null;
}
function unsuspendAfterTimeout(state) {
setTimeout(function () {
state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets);
if (state.unsuspend) {
var unsuspend = state.unsuspend;
state.unsuspend = null;
unsuspend();
}
}, 500);
}
function onUnsuspend() {
this.count--;
if (0 === this.count)
Expand Down Expand Up @@ -16732,7 +16731,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1889 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-68d19c91",
version: "18.3.0-www-classic-cf74bdbb",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -16776,7 +16775,7 @@ var devToolsConfig$jscomp$inline_1889 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-68d19c91"
reconcilerVersion: "18.3.0-www-classic-cf74bdbb"
});
assign(Internals, {
ReactBrowserEventEmitter: {
Expand Down Expand Up @@ -17003,7 +17002,7 @@ exports.unstable_renderSubtreeIntoContainer = function (
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-classic-68d19c91";
exports.version = "18.3.0-www-classic-cf74bdbb";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
Loading

0 comments on commit 34cf2ef

Please sign in to comment.