Index: src/json-stringifier.h |
diff --git a/src/json-stringifier.h b/src/json-stringifier.h |
index b683a46db2667eba0d6a077c06b629a49310cca6..669de069371d4b0d2a92ea32373f14c7c103e811 100644 |
--- a/src/json-stringifier.h |
+++ b/src/json-stringifier.h |
@@ -540,7 +540,10 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeJSObject( |
object->elements()->length() == 0) { |
Handle<Map> map(object->map()); |
for (int i = 0; i < map->NumberOfOwnDescriptors(); i++) { |
- Handle<String> key(map->instance_descriptors()->GetKey(i), isolate_); |
+ Handle<Name> name(map->instance_descriptors()->GetKey(i), isolate_); |
+ // TODO(rossberg): Should this throw? |
+ if (!name->IsString()) continue; |
+ Handle<String> key = Handle<String>::cast(name); |
PropertyDetails details = map->instance_descriptors()->GetDetails(i); |
if (details.IsDontEnum() || details.IsDeleted()) continue; |
Handle<Object> property; |