Commit 84b36651 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Don't turn objects with empty-string properties into fast-mode.

R=ishell@chromium.org

Review URL: https://codereview.chromium.org/165743003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent bb276334
...@@ -15710,6 +15710,7 @@ MaybeObject* NameDictionary::TransformPropertiesToFastFor( ...@@ -15710,6 +15710,7 @@ MaybeObject* NameDictionary::TransformPropertiesToFastFor(
// instance descriptor. // instance descriptor.
MaybeObject* maybe_key = heap->InternalizeString(String::cast(k)); MaybeObject* maybe_key = heap->InternalizeString(String::cast(k));
if (!maybe_key->To(&key)) return maybe_key; if (!maybe_key->To(&key)) return maybe_key;
if (key->Equals(heap->empty_string())) return this;
} }
PropertyDetails details = DetailsAt(i); PropertyDetails details = DetailsAt(i);
......
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var o = {};
o[""] = 1;
var x = {__proto__:o};
for (i = 0; i < 3; i++) {
o[""];
}
for (i = 0; i < 3; i++) {
assertEquals(undefined, o.x);
}
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