Adjust Set references to fix the build.

This commit is contained in:
John-David Dalton
2015-08-30 09:59:19 -07:00
parent 09bcc5aaec
commit 4fbb31b4dc

View File

@@ -1324,7 +1324,6 @@
var ArrayBuffer = context.ArrayBuffer, var ArrayBuffer = context.ArrayBuffer,
Symbol = context.Symbol, Symbol = context.Symbol,
Reflect = context.Reflect, Reflect = context.Reflect,
Set = getNative(context, 'Set'),
Uint8Array = context.Uint8Array, Uint8Array = context.Uint8Array,
WeakMap = getNative(context, 'WeakMap'), WeakMap = getNative(context, 'WeakMap'),
clearTimeout = context.clearTimeout, clearTimeout = context.clearTimeout,
@@ -1346,7 +1345,8 @@
nativeMax = Math.max, nativeMax = Math.max,
nativeMin = Math.min, nativeMin = Math.min,
nativeParseInt = context.parseInt, nativeParseInt = context.parseInt,
nativeRandom = Math.random; nativeRandom = Math.random,
nativeSet = getNative(context, 'Set');
/** Used as references for `-Infinity` and `Infinity`. */ /** Used as references for `-Infinity` and `Infinity`. */
var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY, var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY,
@@ -1751,7 +1751,7 @@
function SetCache(values) { function SetCache(values) {
var length = values ? values.length : 0; var length = values ? values.length : 0;
this.data = { 'hash': nativeCreate(null), 'set': new Set }; this.data = { 'hash': nativeCreate(null), 'set': new nativeSet };
while (length--) { while (length--) {
this.push(values[length]); this.push(values[length]);
} }
@@ -3272,7 +3272,7 @@
* @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.
*/ */
function createCache(values) { function createCache(values) {
return (nativeCreate && Set) ? new SetCache(values) : null; return (nativeCreate && nativeSet) ? new SetCache(values) : null;
} }
/** /**