aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-06-03 07:11:33 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-06-03 07:11:33 +0000
commit0ce599d9c088d30dd748873506002e0ceb21aeaf (patch)
tree25388490ca2517f7c4cd55d06f0e8d652ce90adc
parent342b7e70063d72c5f97f53acefb32c5c40141064 (diff)
parenteb67a3c29d0dfb29b3704e672ceeab146185c80b (diff)
downloadv8-android11-mainline-sparse-2020-dec-release.tar.gz
Change-Id: Id102ded8ad6092a93b493a4b0d265eb48d0938e0
-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);