aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-10-21 18:05:19 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-10-21 18:05:19 +0000
commitc913c329da6c3fe7e58c640a619f424f523753ff (patch)
tree46d75021e9cb0c5e1b54b886d1045a6cb94c95a2
parent3a0db99aac06d6d4c9dfd33fed58a668f49943bd (diff)
parent0100d69c5c26173eec1bd1bea394c8305f3a3d0b (diff)
downloadv8-c913c329da6c3fe7e58c640a619f424f523753ff.tar.gz
Snap for 6921388 from 0100d69c5c26173eec1bd1bea394c8305f3a3d0b to qt-aml-tzdata-release
Change-Id: I2c5777808e58cfce4e370b2cf6a7cfdf906316ce
-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);