aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-06-03 01:12:22 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-06-03 01:12:22 +0000
commit57d4c7f166af41a151ecdef4c80bc04ce3430b76 (patch)
tree25388490ca2517f7c4cd55d06f0e8d652ce90adc
parent05713699d0cd7a92818b8f3e610a89c24d827597 (diff)
parent97572ddffc588d4bc2778f5d5138d302bc131ab2 (diff)
downloadv8-android11-tests-release.tar.gz
Change-Id: I3c2d46423fd5d9faa4e262bf8c45117e1377cc3d
-rw-r--r--src/heap/factory.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/heap/factory.cc b/src/heap/factory.cc
index c8528f9f..2ac0d990 100644
--- a/src/heap/factory.cc
+++ b/src/heap/factory.cc
@@ -469,7 +469,7 @@ Handle<FixedArrayBase> Factory::NewFixedDoubleArray(int length,
PretenureFlag pretenure) {
DCHECK_LE(0, length);
if (length == 0) return empty_fixed_array();
- if (length > FixedDoubleArray::kMaxLength) {
+ if (length < 0 || length > FixedDoubleArray::kMaxLength) {
isolate()->heap()->FatalProcessOutOfMemory("invalid array length");
}
int size = FixedDoubleArray::SizeFor(length);