Skip to content

Commit 7c1be85

Browse files
unstubbablegnoff
andauthored
Backport facebook/react#35351 for 14.2.34 (#87095)
facebook/react#35351 Co-authored-by: Josh Story <[email protected]>
1 parent f307368 commit 7c1be85

File tree

52 files changed

+319
-191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+319
-191
lines changed

packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.development.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3637,8 +3637,12 @@ Chunk.prototype.then = function (resolve, reject) {
36373637
var inspectedValue = chunk.value; // Recursively check if the value is itself a ReactPromise and if so if it points
36383638
// back to itself. This helps catch recursive thenables early error.
36393639

3640+
var cycleProtection = 0;
3641+
36403642
while (inspectedValue instanceof Chunk) {
3641-
if (inspectedValue === chunk) {
3643+
cycleProtection++;
3644+
3645+
if (inspectedValue === chunk || cycleProtection > 1000) {
36423646
if (typeof reject === 'function') {
36433647
reject(new Error('Cannot have cyclic thenables.'));
36443648
}

packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2877,8 +2877,12 @@ Chunk.prototype.then = function (resolve, reject) {
28772877
let inspectedValue = chunk.value; // Recursively check if the value is itself a ReactPromise and if so if it points
28782878
// back to itself. This helps catch recursive thenables early error.
28792879

2880+
let cycleProtection = 0;
2881+
28802882
while (inspectedValue instanceof Chunk) {
2881-
if (inspectedValue === chunk) {
2883+
cycleProtection++;
2884+
2885+
if (inspectedValue === chunk || cycleProtection > 1000) {
28822886
if (typeof reject === 'function') {
28832887
reject(new Error('Cannot have cyclic thenables.'));
28842888
}

packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.browser.production.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.development.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3682,8 +3682,12 @@ Chunk.prototype.then = function (resolve, reject) {
36823682
var inspectedValue = chunk.value; // Recursively check if the value is itself a ReactPromise and if so if it points
36833683
// back to itself. This helps catch recursive thenables early error.
36843684

3685+
var cycleProtection = 0;
3686+
36853687
while (inspectedValue instanceof Chunk) {
3686-
if (inspectedValue === chunk) {
3688+
cycleProtection++;
3689+
3690+
if (inspectedValue === chunk || cycleProtection > 1000) {
36873691
if (typeof reject === 'function') {
36883692
reject(new Error('Cannot have cyclic thenables.'));
36893693
}

packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2900,8 +2900,12 @@ Chunk.prototype.then = function (resolve, reject) {
29002900
let inspectedValue = chunk.value; // Recursively check if the value is itself a ReactPromise and if so if it points
29012901
// back to itself. This helps catch recursive thenables early error.
29022902

2903+
let cycleProtection = 0;
2904+
29032905
while (inspectedValue instanceof Chunk) {
2904-
if (inspectedValue === chunk) {
2906+
cycleProtection++;
2907+
2908+
if (inspectedValue === chunk || cycleProtection > 1000) {
29052909
if (typeof reject === 'function') {
29062910
reject(new Error('Cannot have cyclic thenables.'));
29072911
}

packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.edge.production.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.development.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3729,8 +3729,12 @@ Chunk.prototype.then = function (resolve, reject) {
37293729
var inspectedValue = chunk.value; // Recursively check if the value is itself a ReactPromise and if so if it points
37303730
// back to itself. This helps catch recursive thenables early error.
37313731

3732+
var cycleProtection = 0;
3733+
37323734
while (inspectedValue instanceof Chunk) {
3733-
if (inspectedValue === chunk) {
3735+
cycleProtection++;
3736+
3737+
if (inspectedValue === chunk || cycleProtection > 1000) {
37343738
if (typeof reject === 'function') {
37353739
reject(new Error('Cannot have cyclic thenables.'));
37363740
}

packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-server.node.production.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2963,8 +2963,12 @@ Chunk.prototype.then = function (resolve, reject) {
29632963
let inspectedValue = chunk.value; // Recursively check if the value is itself a ReactPromise and if so if it points
29642964
// back to itself. This helps catch recursive thenables early error.
29652965

2966+
let cycleProtection = 0;
2967+
29662968
while (inspectedValue instanceof Chunk) {
2967-
if (inspectedValue === chunk) {
2969+
cycleProtection++;
2970+
2971+
if (inspectedValue === chunk || cycleProtection > 1000) {
29682972
if (typeof reject === 'function') {
29692973
reject(new Error('Cannot have cyclic thenables.'));
29702974
}

0 commit comments

Comments
 (0)