Increase unlikely array length

This commit is contained in:
Alexey Shvayka 2020-03-23 20:44:01 +02:00 committed by Rick Waldron
parent 17fc10942e
commit 86b94099ad
1 changed files with 4 additions and 2 deletions

View File

@ -139,8 +139,10 @@ function isSameValue(a, b) {
return a === b;
}
function isWritable(obj, name, verifyProp, value) {
var unlikelyValue = Array.isArray(obj) && name === "length" ? 217493 : "unlikelyValue";
function isWritable(obj, name, value) {
var unlikelyValue = Array.isArray(obj) && name === "length" ?
Math.pow(2, 32) - 1 :
"unlikelyValue";
var newValue = value || unlikelyValue;
var hadValue = Object.prototype.hasOwnProperty.call(obj, name);
var oldValue = obj[name];