Don't expose jQuery.deletedIds. Close gh-889.

This commit is contained in:
Rick Waldron
2012-10-20 21:02:01 -04:00
committed by Dave Methvin
parent 2b0e720406
commit 8076a33bd8
3 changed files with 5 additions and 2 deletions

View File

@@ -36,6 +36,9 @@ var
// Used for detecting and trimming whitespace
core_rnotwhite = /\S/,
core_rspace = /\s+/,
// List of deleted data cache ids, so we can reuse them
core_deletedIds = [],
// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,

View File

@@ -32,7 +32,7 @@ function internalData( elem, name, data, pvt /* Internal Use Only */ ){
// Only DOM nodes need a new unique ID for each element since their data
// ends up in the global cache
if ( isNode ) {
elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;
} else {
id = internalKey;
}

View File

@@ -829,7 +829,7 @@ jQuery.extend({
elem[ internalKey ] = null;
}
jQuery.deletedIds.push( id );
core_deletedIds.push( id );
}
}
}