Do not generate new enumeration indices for global objects.
Review URL: https://chromiumcodereview.appspot.com/10911058 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
74f06b1f99
commit
4c7be4f6c6
@ -791,7 +791,7 @@ Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object,
|
||||
// number of holes to a minimum. This avoids allocating a large array if
|
||||
// many properties were added but subsequently deleted.
|
||||
int next_enumeration = dictionary->NextEnumerationIndex();
|
||||
if (next_enumeration > (length * 3) / 2) {
|
||||
if (!object->IsGlobalObject() && next_enumeration > (length * 3) / 2) {
|
||||
StringDictionary::DoGenerateNewEnumerationIndices(dictionary);
|
||||
next_enumeration = dictionary->NextEnumerationIndex();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user