Fix stack overflow for mac build.

R=ulan@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11358096

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2012-11-05 18:39:59 +00:00
parent f95d9502c3
commit 85bda7bc09

View File

@ -569,8 +569,7 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSObject(
!object->HasNamedInterceptor() && !object->HasNamedInterceptor() &&
object->elements()->length() == 0) { object->elements()->length() == 0) {
Handle<Map> map(object->map()); Handle<Map> map(object->map());
int num_desc = map->NumberOfOwnDescriptors(); for (int i = 0; i < map->NumberOfOwnDescriptors(); i++) {
for (int i = 0; i < num_desc; i++) {
Handle<String> key(map->instance_descriptors()->GetKey(i), isolate_); Handle<String> key(map->instance_descriptors()->GetKey(i), isolate_);
PropertyDetails details = map->instance_descriptors()->GetDetails(i); PropertyDetails details = map->instance_descriptors()->GetDetails(i);
if (details.IsDontEnum() || details.IsDeleted()) continue; if (details.IsDontEnum() || details.IsDeleted()) continue;