Skip to content

Commit 8e1db1a

Browse files
author
abhyuday
committed
Merge branch 'master' of https://github.com/facebook/react
2 parents 3c9c845 + 928a819 commit 8e1db1a

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

packages/react-reconciler/src/ReactFiberLane.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,13 @@ export function higherLanePriority(
640640
}
641641

642642
export function createLaneMap<T>(initial: T): LaneMap<T> {
643-
return new Array(TotalLanes).fill(initial);
643+
// Intentionally pushing one by one.
644+
// https://v8.dev/blog/elements-kinds#avoid-creating-holes
645+
const laneMap = [];
646+
for (let i = 0; i < TotalLanes; i++) {
647+
laneMap.push(initial);
648+
}
649+
return laneMap;
644650
}
645651

646652
export function markRootUpdated(

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11536,12 +11536,12 @@ [email protected]:
1153611536
react-timer-mixin "^0.13.4"
1153711537

1153811538
react-shallow-renderer@^16.13.1:
11539-
version "16.13.1"
11540-
resolved "https://registry.yarnpkg.com/react-shallow-renderer/-/react-shallow-renderer-16.13.1.tgz#4cfd6dc0f05a8d4d261ff7a80e9b88f15491a00a"
11541-
integrity sha512-hLmExm5/ZnjodLgm/4oxYw4i7fL6LLPhbO9mF/4tmaZUurtLrp2aSeDHZmRk0SVCHXPz0VaEbb3Dqi5J7odz7Q==
11539+
version "16.14.1"
11540+
resolved "https://registry.yarnpkg.com/react-shallow-renderer/-/react-shallow-renderer-16.14.1.tgz#bf0d02df8a519a558fd9b8215442efa5c840e124"
11541+
integrity sha512-rkIMcQi01/+kxiTE9D3fdS959U1g7gs+/rborw++42m1O9FAQiNI/UNRZExVUoAOprn4umcXf+pFRou8i4zuBg==
1154211542
dependencies:
1154311543
object-assign "^4.1.1"
11544-
react-is "^16.12.0"
11544+
react-is "^16.12.0 || ^17.0.0"
1154511545

1154611546
react-timer-mixin@^0.13.4:
1154711547
version "0.13.4"

0 commit comments

Comments
 (0)