Commit 4c7be4f6 authored by verwaest@chromium.org's avatar verwaest@chromium.org

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
parent 74f06b1f
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment