Skip to content
forked from v8/v8

Commit

Permalink
[Promise.any] Fix errors allocation
Browse files Browse the repository at this point in the history
Bug: chromium:1379054
Change-Id: Ibfcdd4ddc3c9a26471094074c8e7810d93abc898
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3988924
Commit-Queue: Marja Hölttä <marja@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83968}
  • Loading branch information
syg authored and V8 LUCI CQ committed Oct 28, 2022
1 parent dc2933e commit e08fa94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/builtins/promise-any.tq
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ PromiseAnyRejectElementClosure(
kPromiseAnyRejectElementRemainingSlot);

// 9. Set errors[index] to x.
const newCapacity = IntPtrMax(SmiUntag(remainingElementsCount), index + 1);
const newCapacity = index + 1;
if (newCapacity > errors.length_intptr) deferred {
errors = ExtractFixedArray(errors, 0, errors.length_intptr, newCapacity);
*ContextSlot(
Expand Down

0 comments on commit e08fa94

Please sign in to comment.