[bigint] Fix harmless DCHECK failure
Behavior in Release mode was correct; Debug mode triggered a DCHECK failure that indicated an inefficiency: when a requested truncation would be a no-op, we should return the original BigInt, rather than creating a copy. In the special case of -2^(n-1), i.e. the smallest negative n-bit integer, getting truncated to n bits, with n being a multiple of kDigitBits, this shortcut was not taken. Bug: v8:8426 Change-Id: I8e4595d9ac0dbef81aae06688f9a9636bd2d9cd9 Reviewed-on: https://chromium-review.googlesource.com/c/1325029Reviewed-by: Georg Neis <neis@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#57369}
Showing
Please
register
or
sign in
to comment