Remove old JIT and engine bug guards.

This commit is contained in:
John-David Dalton
2016-08-03 21:40:48 -07:00
parent 02e9f4c333
commit a98667ca05
2 changed files with 5 additions and 72 deletions

View File

@@ -2824,12 +2824,7 @@
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHas(object, key) {
// Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
// that are composed entirely of index properties, return `false` for
// `hasOwnProperty` checks of them.
return object != null &&
(hasOwnProperty.call(object, key) ||
(typeof object == 'object' && key in object && getPrototype(object) === null));
return object != null && hasOwnProperty.call(object, key);
}
/**
@@ -4004,7 +3999,7 @@
object = parent(object, path);
var key = toKey(last(path));
return !(object != null && baseHas(object, key)) || delete object[key];
return !(object != null && hasOwnProperty.call(object, key)) || delete object[key];
}
/**
@@ -5412,7 +5407,7 @@
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : baseHas(other, key))) {
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
@@ -5548,19 +5543,6 @@
return arguments.length ? result(arguments[0], arguments[1]) : result;
}
/**
* Gets the "length" property value of `object`.
*
* **Note:** This function is used to avoid a
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
* Safari on at least iOS 8.1-8.3 ARM64.
*
* @private
* @param {Object} object The object to query.
* @returns {*} Returns the "length" value.
*/
var getLength = baseProperty('length');
/**
* Gets the data for `map`.
*
@@ -10888,7 +10870,7 @@
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(getLength(value)) && !isFunction(value);
return value != null && isLength(value.length) && !isFunction(value);
}
/**
@@ -12838,7 +12820,7 @@
length = result.length;
for (var key in object) {
if (baseHas(object, key) &&
if (hasOwnProperty.call(object, key) &&
!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
!(isProto && key == 'constructor')) {
result.push(key);